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>2023-10-19 18:07:55 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-10-19 18:07:55 +0300
commit3c55affa6684311ca73bc4e3d3bfb17b7541f63b (patch)
treeb15020de36fa6b7c0b10bce78165eea79dc1455e /spec/finders
parent881435f2a3eeca1b5b544ad7c7510481b1773d1b (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/finders')
-rw-r--r--spec/finders/ci/runners_finder_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/finders/ci/runners_finder_spec.rb b/spec/finders/ci/runners_finder_spec.rb
index 06cca035c6f..57a77b08cea 100644
--- a/spec/finders/ci/runners_finder_spec.rb
+++ b/spec/finders/ci/runners_finder_spec.rb
@@ -148,6 +148,14 @@ RSpec.describe Ci::RunnersFinder, feature_category: :runner_fleet do
described_class.new(current_user: admin, params: { tag_name: %w[tag1 tag2] }).execute
end
end
+
+ context 'by creator' do
+ it 'calls the corresponding scope on Ci::Runner' do
+ expect(Ci::Runner).to receive(:with_creator_id).with('1').and_call_original
+
+ described_class.new(current_user: admin, params: { creator_id: '1' }).execute
+ end
+ end
end
context 'sorting' do
@@ -608,6 +616,16 @@ RSpec.describe Ci::RunnersFinder, feature_category: :runner_fleet do
expect(subject).to match_array([runner_project_active, runner_project_inactive])
end
end
+
+ context 'by creator' do
+ let_it_be(:runner_creator_1) { create(:ci_runner, creator_id: '1') }
+
+ let(:extra_params) { { creator_id: '1' } }
+
+ it 'returns correct runners' do
+ is_expected.to contain_exactly(runner_creator_1)
+ end
+ end
end
end