Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-05-10 12:35:02 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2018-05-11 09:27:43 +0300
commita5cb2fe2e09b9b758905693360ecc680ff4afe2a (patch)
treea8b72984709ac8bceb4d1f3a79e7e24893abdec0 /spec/features
parent35816eb7be76aa1a26dcf2f9cfeddf7c60b2da26 (diff)
Allow a user to sign out when on the terms page
Before we would block the `sign_out` request when the user did not accept the terms, therefore redirecting them to the terms again. By allowing all request to devise controllers, we avoid this problem.
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/users/terms_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/features/users/terms_spec.rb b/spec/features/users/terms_spec.rb
index bf6b5fa3d6a..f9469adbfe3 100644
--- a/spec/features/users/terms_spec.rb
+++ b/spec/features/users/terms_spec.rb
@@ -81,4 +81,22 @@ describe 'Users > Terms' do
expect(find_field('issue_description').value).to eq("We don't want to lose what the user typed")
end
end
+
+ context 'when the terms are enforced' do
+ before do
+ enforce_terms
+ end
+
+ context 'signing out', :js do
+ it 'allows the user to sign out without a response' do
+ visit terms_path
+
+ find('.header-user-dropdown-toggle').click
+ click_link('Sign out')
+
+ expect(page).to have_content('Sign in')
+ expect(page).to have_content('Register')
+ end
+ end
+ end
end