diff options
Diffstat (limited to 'spec/requests/api')
-rw-r--r-- | spec/requests/api/ci/runners_spec.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/requests/api/ci/runners_spec.rb b/spec/requests/api/ci/runners_spec.rb index 7ba67f7f29b..4c2fb649e4d 100644 --- a/spec/requests/api/ci/runners_spec.rb +++ b/spec/requests/api/ci/runners_spec.rb @@ -1026,7 +1026,8 @@ RSpec.describe API::Ci::Runners do get api("/groups/#{group.id}/runners", user) expect(json_response).to match_array([ - a_hash_including('description' => 'Group runner A', 'active' => true, 'paused' => false) + a_hash_including('description' => 'Group runner A', 'active' => true, 'paused' => false), + a_hash_including('description' => 'Shared runner', 'active' => true, 'paused' => false) ]) end @@ -1039,6 +1040,14 @@ RSpec.describe API::Ci::Runners do ]) end + it 'returns instance runners when instance_type is specified' do + get api("/groups/#{group.id}/runners?type=instance_type", user) + + expect(json_response).to match_array([ + a_hash_including('description' => 'Shared runner') + ]) + end + it 'returns empty result when type does not match' do get api("/groups/#{group.id}/runners?type=project_type", user) |