diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-04-27 14:56:50 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-05-04 13:54:43 +0200 |
commit | 10aa55a770c2985c22c92d17b8a7ea90b0a09085 (patch) | |
tree | 15b66bb5e3f26d0a49c07bf781c644deb998f0c8 /spec/helpers | |
parent | 65bea3f7d0bf30b5f9a9b3f94567474d3c8f7cbc (diff) | |
download | gitlab-ce-10aa55a770c2985c22c92d17b8a7ea90b0a09085.tar.gz |
Allow a user to accept/decline terms
When a user accepts, we store this in the agreements to keep track of
which terms they accepted. We also update the flag on the user.
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/users_helper_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/helpers/users_helper_spec.rb b/spec/helpers/users_helper_spec.rb index 9f67277801f..b18c045848f 100644 --- a/spec/helpers/users_helper_spec.rb +++ b/spec/helpers/users_helper_spec.rb @@ -1,6 +1,8 @@ require 'rails_helper' describe UsersHelper do + include TermsHelper + let(:user) { create(:user) } describe '#user_link' do @@ -51,5 +53,15 @@ describe UsersHelper do expect(items).to include(:profile) end + + context 'when terms are enforced' do + before do + enforce_terms + end + + it 'hides the profile and the settings tab' do + expect(items).not_to include(:settings, :profile, :help) + end + end end end |