summaryrefslogtreecommitdiff
path: root/spec/helpers/nav_helper_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/helpers/nav_helper_spec.rb')
-rw-r--r--spec/helpers/nav_helper_spec.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/helpers/nav_helper_spec.rb b/spec/helpers/nav_helper_spec.rb
index f92dca11136..6bdbec1203c 100644
--- a/spec/helpers/nav_helper_spec.rb
+++ b/spec/helpers/nav_helper_spec.rb
@@ -117,4 +117,24 @@ describe NavHelper, :do_not_mock_admin_mode do
it { is_expected.to all(be_a(String)) }
end
+
+ describe '.show_user_notification_dot?' do
+ subject { helper.show_user_notification_dot? }
+
+ context 'when experiment is disabled' do
+ before do
+ allow(helper).to receive(:experiment_enabled?).with(:ci_notification_dot).and_return(false)
+ end
+
+ it { is_expected.to be_falsey }
+ end
+
+ context 'when experiment is enabled' do
+ before do
+ allow(helper).to receive(:experiment_enabled?).with(:ci_notification_dot).and_return(true)
+ end
+
+ it { is_expected.to be_truthy }
+ end
+ end
end