From 0dfccd995aa9bf560e59299f3a4f1705d6981115 Mon Sep 17 00:00:00 2001 From: Semyon Pupkov Date: Sun, 12 Feb 2017 13:02:26 +0500 Subject: Add active_when helper Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/24036 --- spec/helpers/application_helper_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'spec/helpers') diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index 8b201f348f1..fd40fe99941 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -265,4 +265,9 @@ describe ApplicationHelper do expect(helper.render_markup('foo.adoc', content)).to eq('NOEL') end end + + describe '#active_when' do + it { expect(helper.active_when(true)).to eq('active') } + it { expect(helper.active_when(false)).to eq(nil) } + end end -- cgit v1.2.1