diff options
Diffstat (limited to 'spec/helpers/projects_helper_spec.rb')
-rw-r--r-- | spec/helpers/projects_helper_spec.rb | 42 |
1 files changed, 2 insertions, 40 deletions
diff --git a/spec/helpers/projects_helper_spec.rb b/spec/helpers/projects_helper_spec.rb index 17e3f8f9c06..189ab1a8354 100644 --- a/spec/helpers/projects_helper_spec.rb +++ b/spec/helpers/projects_helper_spec.rb @@ -719,11 +719,7 @@ describe ProjectsHelper do end describe '#show_merge_request_count' do - context 'when the feature flag is enabled' do - before do - stub_feature_flags(project_list_show_mr_count: true) - end - + context 'enabled flag' do it 'returns true if compact mode is disabled' do expect(helper.show_merge_request_count?).to be_truthy end @@ -733,22 +729,7 @@ describe ProjectsHelper do end end - context 'when the feature flag is disabled' do - before do - stub_feature_flags(project_list_show_mr_count: false) - end - - it 'always returns false' do - expect(helper.show_merge_request_count?(disabled: false)).to be_falsy - expect(helper.show_merge_request_count?(disabled: true)).to be_falsy - end - end - context 'disabled flag' do - before do - stub_feature_flags(project_list_show_mr_count: true) - end - it 'returns false if disabled flag is true' do expect(helper.show_merge_request_count?(disabled: true)).to be_falsey end @@ -760,11 +741,7 @@ describe ProjectsHelper do end describe '#show_issue_count?' do - context 'when the feature flag is enabled' do - before do - stub_feature_flags(project_list_show_issue_count: true) - end - + context 'enabled flag' do it 'returns true if compact mode is disabled' do expect(helper.show_issue_count?).to be_truthy end @@ -774,22 +751,7 @@ describe ProjectsHelper do end end - context 'when the feature flag is disabled' do - before do - stub_feature_flags(project_list_show_issue_count: false) - end - - it 'always returns false' do - expect(helper.show_issue_count?(disabled: false)).to be_falsy - expect(helper.show_issue_count?(disabled: true)).to be_falsy - end - end - context 'disabled flag' do - before do - stub_feature_flags(project_list_show_issue_count: true) - end - it 'returns false if disabled flag is true' do expect(helper.show_issue_count?(disabled: true)).to be_falsey end |