Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-06-16 15:09:26 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-06-16 15:09:26 +0300
commitb019dc959ec16b15fe42a680dbd729542ff61537 (patch)
treecde5c3d0582bd7542e1e195d83ad7a50079f4e49 /spec/finders
parentb7b44de429911864686599ef1643baf525bf75ec (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/finders')
-rw-r--r--spec/finders/crm/contacts_finder_spec.rb8
-rw-r--r--spec/finders/crm/organizations_finder_spec.rb8
2 files changed, 16 insertions, 0 deletions
diff --git a/spec/finders/crm/contacts_finder_spec.rb b/spec/finders/crm/contacts_finder_spec.rb
index 14f838812a6..fee4f049123 100644
--- a/spec/finders/crm/contacts_finder_spec.rb
+++ b/spec/finders/crm/contacts_finder_spec.rb
@@ -143,6 +143,14 @@ RSpec.describe Crm::ContactsFinder do
expect(finder.execute).to match_array([search_test_b])
end
end
+
+ context 'when searching for contacts ids' do
+ it 'returns the expected contacts' do
+ finder = described_class.new(user, group: search_test_group, ids: [search_test_b.id])
+
+ expect(finder.execute).to match_array([search_test_b])
+ end
+ end
end
end
end
diff --git a/spec/finders/crm/organizations_finder_spec.rb b/spec/finders/crm/organizations_finder_spec.rb
index 94b5d9e5874..807c9f36484 100644
--- a/spec/finders/crm/organizations_finder_spec.rb
+++ b/spec/finders/crm/organizations_finder_spec.rb
@@ -129,6 +129,14 @@ RSpec.describe Crm::OrganizationsFinder do
expect(finder.execute).to match_array([search_test_b])
end
end
+
+ context 'when searching for organizations ids' do
+ it 'returns the expected organizations' do
+ finder = described_class.new(user, group: search_test_group, ids: [search_test_a.id])
+
+ expect(finder.execute).to match_array([search_test_a])
+ end
+ end
end
end
end