diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-16 21:11:26 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-16 21:11:26 +0300 |
commit | 8fa0c53e26c947ac647b8067fde3e9673b77b1a6 (patch) | |
tree | da32e7224125973e9e87d3856fb7e672ff41c8b1 /spec/helpers/form_helper_spec.rb | |
parent | 0552020767452da44de2bf5424096f2cb2ea6bf5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers/form_helper_spec.rb')
-rw-r--r-- | spec/helpers/form_helper_spec.rb | 42 |
1 files changed, 9 insertions, 33 deletions
diff --git a/spec/helpers/form_helper_spec.rb b/spec/helpers/form_helper_spec.rb index 14ff5d97057..1797b0e32cd 100644 --- a/spec/helpers/form_helper_spec.rb +++ b/spec/helpers/form_helper_spec.rb @@ -44,43 +44,19 @@ RSpec.describe FormHelper do describe '#assignees_dropdown_options' do let(:merge_request) { build(:merge_request) } - context "with the :limit_assignees_per_issuable feature flag on" do - context "with multiple assignees" do - it 'correctly returns the max amount of assignees to allow' do - allow(helper).to receive(:merge_request_supports_multiple_assignees?).and_return(true) + context "with multiple assignees" do + it 'correctly returns the max amount of assignees to allow' do + allow(helper).to receive(:merge_request_supports_multiple_assignees?).and_return(true) - expect(helper.assignees_dropdown_options(:merge_request)[:data][:'max-select']) - .to eq(Issuable::MAX_NUMBER_OF_ASSIGNEES_OR_REVIEWERS) - end - end - - context "with only 1 assignee" do - it 'correctly returns the max amount of assignees to allow' do - expect(helper.assignees_dropdown_options(:merge_request)[:data][:'max-select']) - .to eq(1) - end + expect(helper.assignees_dropdown_options(:merge_request)[:data][:'max-select']) + .to eq(Issuable::MAX_NUMBER_OF_ASSIGNEES_OR_REVIEWERS) end end - context "with the :limit_assignees_per_issuable feature flag off" do - before do - stub_feature_flags(limit_assignees_per_issuable: false) - end - - context "with multiple assignees" do - it 'correctly returns the max amount of assignees to allow' do - allow(helper).to receive(:merge_request_supports_multiple_assignees?).and_return(true) - - expect(helper.assignees_dropdown_options(:merge_request)[:data][:'max-select']) - .to eq(nil) - end - end - - context "with only 1 assignee" do - it 'correctly returns the max amount of assignees to allow' do - expect(helper.assignees_dropdown_options(:merge_request)[:data][:'max-select']) - .to eq(1) - end + context "with only 1 assignee" do + it 'correctly returns the max amount of assignees to allow' do + expect(helper.assignees_dropdown_options(:merge_request)[:data][:'max-select']) + .to eq(1) end end end |