diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-02 12:10:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-02 12:10:09 +0300 |
commit | 1930898566965dbc1bd779089ec9e58e17674268 (patch) | |
tree | a1e4384e4e8927431b637daa885dc8793cbb0035 /spec/features | |
parent | 2691cff8296517651e4bcd8adac09640f8cc28f5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/admin/admin_mode/logout_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/admin/admin_mode_spec.rb | 4 | ||||
-rw-r--r-- | spec/features/projects/branches_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/projects/compare_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/projects/settings/registry_settings_spec.rb | 6 | ||||
-rw-r--r-- | spec/features/read_only_spec.rb | 4 | ||||
-rw-r--r-- | spec/features/users/logout_spec.rb | 2 |
7 files changed, 11 insertions, 11 deletions
diff --git a/spec/features/admin/admin_mode/logout_spec.rb b/spec/features/admin/admin_mode/logout_spec.rb index 5e0c43cdee2..58bea5c4b5f 100644 --- a/spec/features/admin/admin_mode/logout_spec.rb +++ b/spec/features/admin/admin_mode/logout_spec.rb @@ -37,7 +37,7 @@ RSpec.describe 'Admin Mode Logout', :js do context 'on a read-only instance' do before do - allow(Gitlab::Database.main).to receive(:read_only?).and_return(true) + allow(Gitlab::Database).to receive(:read_only?).and_return(true) end it 'disable removes admin mode and redirects to root page' do diff --git a/spec/features/admin/admin_mode_spec.rb b/spec/features/admin/admin_mode_spec.rb index e2653e6b3a8..24a10d3677d 100644 --- a/spec/features/admin/admin_mode_spec.rb +++ b/spec/features/admin/admin_mode_spec.rb @@ -57,7 +57,7 @@ RSpec.describe 'Admin mode', :js do context 'on a read-only instance' do before do - allow(Gitlab::Database.main).to receive(:read_only?).and_return(true) + allow(Gitlab::Database).to receive(:read_only?).and_return(true) end it 'can enter admin mode' do @@ -117,7 +117,7 @@ RSpec.describe 'Admin mode', :js do context 'on a read-only instance' do before do - allow(Gitlab::Database.main).to receive(:read_only?).and_return(true) + allow(Gitlab::Database).to receive(:read_only?).and_return(true) end it 'can leave admin mode' do diff --git a/spec/features/projects/branches_spec.rb b/spec/features/projects/branches_spec.rb index 37d76a0a8ed..0a79719f14a 100644 --- a/spec/features/projects/branches_spec.rb +++ b/spec/features/projects/branches_spec.rb @@ -315,7 +315,7 @@ RSpec.describe 'Branches' do context 'on a read-only instance' do before do - allow(Gitlab::Database.main).to receive(:read_only?).and_return(true) + allow(Gitlab::Database).to receive(:read_only?).and_return(true) end it_behaves_like 'compares branches' diff --git a/spec/features/projects/compare_spec.rb b/spec/features/projects/compare_spec.rb index 0c93f6284bb..bc3ef2af9b0 100644 --- a/spec/features/projects/compare_spec.rb +++ b/spec/features/projects/compare_spec.rb @@ -40,7 +40,7 @@ RSpec.describe "Compare", :js do context 'on a read-only instance' do before do - allow(Gitlab::Database.main).to receive(:read_only?).and_return(true) + allow(Gitlab::Database).to receive(:read_only?).and_return(true) end it_behaves_like 'compares branches' diff --git a/spec/features/projects/settings/registry_settings_spec.rb b/spec/features/projects/settings/registry_settings_spec.rb index 3f9f2dae453..509729d526d 100644 --- a/spec/features/projects/settings/registry_settings_spec.rb +++ b/spec/features/projects/settings/registry_settings_spec.rb @@ -9,12 +9,12 @@ RSpec.describe 'Project > Settings > CI/CD > Container registry tag expiration p let_it_be(:project, reload: true) { create(:project, namespace: user.namespace) } let(:container_registry_enabled) { true } - let(:container_registry_enabled_on_project) { true } + let(:container_registry_enabled_on_project) { ProjectFeature::ENABLED } subject { visit project_settings_packages_and_registries_path(project) } before do - project.update!(container_registry_enabled: container_registry_enabled_on_project) + project.project_feature.update!(container_registry_access_level: container_registry_enabled_on_project) project.container_expiration_policy.update!(enabled: true) sign_in(user) @@ -104,7 +104,7 @@ RSpec.describe 'Project > Settings > CI/CD > Container registry tag expiration p end context 'when container registry is disabled on project' do - let(:container_registry_enabled_on_project) { false } + let(:container_registry_enabled_on_project) { ProjectFeature::DISABLED } it 'does not exists' do subject diff --git a/spec/features/read_only_spec.rb b/spec/features/read_only_spec.rb index 95b8e14c07f..11686552062 100644 --- a/spec/features/read_only_spec.rb +++ b/spec/features/read_only_spec.rb @@ -11,7 +11,7 @@ RSpec.describe 'read-only message' do context 'when database is read-only' do before do - allow(Gitlab::Database.main).to receive(:read_only?).and_return(true) + allow(Gitlab::Database).to receive(:read_only?).and_return(true) end it_behaves_like 'Read-only instance', /You are on a read\-only GitLab instance./ @@ -19,7 +19,7 @@ RSpec.describe 'read-only message' do context 'when database is in read-write mode' do before do - allow(Gitlab::Database.main).to receive(:read_only?).and_return(false) + allow(Gitlab::Database).to receive(:read_only?).and_return(false) end it_behaves_like 'Read-write instance', /You are on a read\-only GitLab instance./ diff --git a/spec/features/users/logout_spec.rb b/spec/features/users/logout_spec.rb index b23eeb9b30e..ffb8785b277 100644 --- a/spec/features/users/logout_spec.rb +++ b/spec/features/users/logout_spec.rb @@ -24,7 +24,7 @@ RSpec.describe 'Logout/Sign out', :js do context 'on a read-only instance' do before do - allow(Gitlab::Database.main).to receive(:read_only?).and_return(true) + allow(Gitlab::Database).to receive(:read_only?).and_return(true) end it 'sign out redirects to sign in page' do |