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>2020-08-20 21:42:06 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-20 21:42:06 +0300
commit6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch)
tree78be5963ec075d80116a932011d695dd33910b4e /spec/requests/api/jobs_spec.rb
parent1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff)
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'spec/requests/api/jobs_spec.rb')
-rw-r--r--spec/requests/api/jobs_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/requests/api/jobs_spec.rb b/spec/requests/api/jobs_spec.rb
index 53c57931d36..77d5a4f26a8 100644
--- a/spec/requests/api/jobs_spec.rb
+++ b/spec/requests/api/jobs_spec.rb
@@ -239,6 +239,18 @@ RSpec.describe API::Jobs do
end
end
+ context 'when config source not ci' do
+ let(:non_ci_config_source) { ::Ci::PipelineEnums.non_ci_config_source_values.first }
+ let(:pipeline) do
+ create(:ci_pipeline, config_source: non_ci_config_source, project: project)
+ end
+
+ it 'returns the specified pipeline' do
+ expect(response).to have_gitlab_http_status(:ok)
+ expect(json_response[0]['pipeline']['sha']).to eq(pipeline.sha.to_s)
+ end
+ end
+
it 'avoids N+1 queries' do
control_count = ActiveRecord::QueryRecorder.new(skip_cached: false) do
get api("/projects/#{project.id}/pipelines/#{pipeline.id}/jobs", api_user), params: query