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:
authortauriedavis <taurie@gitlab.com>2018-05-26 02:17:57 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2018-06-04 23:22:11 +0300
commit285ffb223896f2226531be2ba10933414194155c (patch)
treecd6faec94ab2e4f65b0ed48f458b580b2853fac9 /spec/features/users
parent35ba75f6b93c77f078ab2cf538a256f8aa534eb3 (diff)
Messaging on terms page when user already accepted
We show a blue flash banner if the user already accepted, and show a button allowing them to continue to the application.
Diffstat (limited to 'spec/features/users')
-rw-r--r--spec/features/users/terms_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/features/users/terms_spec.rb b/spec/features/users/terms_spec.rb
index 1efa5cd5490..af407c52917 100644
--- a/spec/features/users/terms_spec.rb
+++ b/spec/features/users/terms_spec.rb
@@ -39,6 +39,22 @@ describe 'Users > Terms' do
end
end
+ context 'when the user has already accepted the terms' do
+ before do
+ accept_terms(user)
+ end
+
+ it 'allows the user to continue to the app' do
+ visit terms_path
+
+ expect(page).to have_content "You have already accepted the Terms of Service as #{user.to_reference}"
+
+ click_link 'Continue'
+
+ expect(current_path).to eq(root_path)
+ end
+ end
+
context 'terms were enforced while session is active', :js do
let(:project) { create(:project) }