diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-31 18:07:20 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-31 18:07:20 +0300 |
commit | fab00cd7efb84b369dfb45cabb797f7feace4b66 (patch) | |
tree | fd3eb7509bf3947ddd818214350a06d16822c78a /spec/helpers | |
parent | 07f6ded1cb698550284e5f348de8f1b884e715ae (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/search_helper_spec.rb | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/spec/helpers/search_helper_spec.rb b/spec/helpers/search_helper_spec.rb index b5e5e5a711f..c0f129cefc3 100644 --- a/spec/helpers/search_helper_spec.rb +++ b/spec/helpers/search_helper_spec.rb @@ -805,22 +805,38 @@ RSpec.describe SearchHelper, feature_category: :global_search do allow(self).to receive(:current_user).and_return(:the_current_user) end - where(:confidential, :expected) do + where(:input, :expected) do '0' | false '1' | true 'yes' | true 'no' | false + 'true' | true + 'false' | false true | true false | false end - let(:params) { { confidential: confidential } } + describe 'for confidential' do + let(:params) { { confidential: input } } - with_them do - it 'transforms confidentiality param' do - expect(::SearchService).to receive(:new).with(:the_current_user, { confidential: expected }) + with_them do + it 'transforms param' do + expect(::SearchService).to receive(:new).with(:the_current_user, { confidential: expected }) - subject + subject + end + end + end + + describe 'for include_archived' do + let(:params) { { include_archived: input } } + + with_them do + it 'transforms param' do + expect(::SearchService).to receive(:new).with(:the_current_user, { include_archived: expected }) + + subject + end end end end |