From e5dd249c4ffb18dc6928e86ae0547b071f33dd72 Mon Sep 17 00:00:00 2001 From: Dennis Tang <750946-dennis@users.noreply.gitlab.com> Date: Wed, 14 Aug 2019 12:20:36 +0000 Subject: 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. --- spec/helpers/user_callouts_helper_spec.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'spec/helpers') 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) -- cgit v1.2.1