diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 08:27:35 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 08:27:35 +0000 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /spec/features/read_only_spec.rb | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) | |
download | gitlab-ce-7e9c479f7de77702622631cff2628a9c8dcbc627.tar.gz |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'spec/features/read_only_spec.rb')
-rw-r--r-- | spec/features/read_only_spec.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/features/read_only_spec.rb b/spec/features/read_only_spec.rb index eb043d2193a..11686552062 100644 --- a/spec/features/read_only_spec.rb +++ b/spec/features/read_only_spec.rb @@ -9,19 +9,19 @@ RSpec.describe 'read-only message' do sign_in(user) end - it 'shows read-only banner when database is read-only' do - allow(Gitlab::Database).to receive(:read_only?).and_return(true) + context 'when database is read-only' do + before do + allow(Gitlab::Database).to receive(:read_only?).and_return(true) + end - visit root_dashboard_path - - expect(page).to have_content('You are on a read-only GitLab instance.') + it_behaves_like 'Read-only instance', /You are on a read\-only GitLab instance./ end - it 'does not show read-only banner when database is able to read-write' do - allow(Gitlab::Database).to receive(:read_only?).and_return(false) - - visit root_dashboard_path + context 'when database is in read-write mode' do + before do + allow(Gitlab::Database).to receive(:read_only?).and_return(false) + end - expect(page).not_to have_content('You are on a read-only GitLab instance.') + it_behaves_like 'Read-write instance', /You are on a read\-only GitLab instance./ end end |