summaryrefslogtreecommitdiff
path: root/spec/features/users
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-23 03:08:53 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-23 03:08:53 +0000
commitccaa94488202341c25d24f6f16a70a9f658fc742 (patch)
tree886b8d0d4c14585243f3ccb439057e19f1860767 /spec/features/users
parentd65442b1d9621da6749d59ea1a544a2ea39b3a79 (diff)
downloadgitlab-ce-ccaa94488202341c25d24f6f16a70a9f658fc742.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/users')
-rw-r--r--spec/features/users/logout_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/features/users/logout_spec.rb b/spec/features/users/logout_spec.rb
index 64202776b9b..a72a42c738d 100644
--- a/spec/features/users/logout_spec.rb
+++ b/spec/features/users/logout_spec.rb
@@ -21,4 +21,16 @@ describe 'Logout/Sign out', :js do
expect(page).not_to have_selector('.flash-notice')
end
+
+ context 'on a read-only instance' do
+ before do
+ allow(Gitlab::Database).to receive(:read_only?).and_return(true)
+ end
+
+ it 'sign out redirects to sign in page' do
+ gitlab_sign_out
+
+ expect(current_path).to eq new_user_session_path
+ end
+ end
end