diff options
author | tauriedavis <taurie@gitlab.com> | 2018-05-25 16:17:57 -0700 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-06-04 22:22:11 +0200 |
commit | 285ffb223896f2226531be2ba10933414194155c (patch) | |
tree | cd6faec94ab2e4f65b0ed48f458b580b2853fac9 /spec/features | |
parent | 35ba75f6b93c77f078ab2cf538a256f8aa534eb3 (diff) | |
download | gitlab-ce-46585-gdpr-terms-acceptance.tar.gz |
Messaging on terms page when user already accepted46585-gdpr-terms-acceptance
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')
-rw-r--r-- | spec/features/users/terms_spec.rb | 16 |
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) } |