diff options
author | Dennis Tang <750946-dennis@users.noreply.gitlab.com> | 2019-08-14 12:20:36 +0000 |
---|---|---|
committer | Kushal Pandya <kushalspandya@gmail.com> | 2019-08-14 12:20:36 +0000 |
commit | e5dd249c4ffb18dc6928e86ae0547b071f33dd72 (patch) | |
tree | 68627c5ad44168a18edbcf452eaf9c2297a62f14 /spec | |
parent | 16f3f33e748d61b494f8815501e2a884d114255d (diff) | |
download | gitlab-ce-e5dd249c4ffb18dc6928e86ae0547b071f33dd72.tar.gz |
Add notification for updated privacy policy
This adds a notification to let users know of our updated privacy
policy.
Users can dismiss the notification either by following the link or
closing the notification via an "x" icon.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/helpers/user_callouts_helper_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/helpers/user_callouts_helper_spec.rb b/spec/helpers/user_callouts_helper_spec.rb index 8fa479a4474..c85f3622464 100644 --- a/spec/helpers/user_callouts_helper_spec.rb +++ b/spec/helpers/user_callouts_helper_spec.rb @@ -45,6 +45,26 @@ describe UserCalloutsHelper do end end + describe '.show_privacy_policy_update_64341?' do + subject { helper.show_privacy_policy_update_64341? } + + context 'when user has not dismissed' do + before do + allow(helper).to receive(:user_dismissed?).and_return(false) + end + + it { is_expected.to be true } + end + + context 'when user dismissed' do + before do + allow(helper).to receive(:user_dismissed?).and_return(true) + end + + it { is_expected.to be false } + end + end + describe '.render_flash_user_callout' do it 'renders the flash_user_callout partial' do expect(helper).to receive(:render) |