diff options
author | Robert Speicher <rspeicher@gmail.com> | 2018-07-18 14:57:08 -0700 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2018-07-18 15:04:45 -0700 |
commit | 6cb52964a6c0b64d422b4618c116a4ff9d044b67 (patch) | |
tree | 5559f18a9e396ce1021cc80b6a91c83a56a6f3b7 /spec | |
parent | 1df32177a8dfd0f1f948a48ee9cf87ba74f43417 (diff) | |
download | gitlab-ce-6cb52964a6c0b64d422b4618c116a4ff9d044b67.tar.gz |
Expose web_url attribute in PipelineBasic and JobBasicrs-web_url-for-pipelines-and-jobs
Diffstat (limited to 'spec')
-rw-r--r-- | spec/fixtures/api/schemas/pipeline.json | 4 | ||||
-rw-r--r-- | spec/requests/api/jobs_spec.rb | 1 | ||||
-rw-r--r-- | spec/requests/api/pipelines_spec.rb | 3 |
3 files changed, 7 insertions, 1 deletions
diff --git a/spec/fixtures/api/schemas/pipeline.json b/spec/fixtures/api/schemas/pipeline.json index 55511d17b5e..b6e30c40f13 100644 --- a/spec/fixtures/api/schemas/pipeline.json +++ b/spec/fixtures/api/schemas/pipeline.json @@ -319,6 +319,10 @@ "id": "/properties/updated_at", "type": "string" }, + "web_url": { + "id": "/properties/web_url", + "type": "string" + }, "user": { "id": "/properties/user", "properties": { diff --git a/spec/requests/api/jobs_spec.rb b/spec/requests/api/jobs_spec.rb index 7d1a5c12805..8412d0383f7 100644 --- a/spec/requests/api/jobs_spec.rb +++ b/spec/requests/api/jobs_spec.rb @@ -220,6 +220,7 @@ describe API::Jobs do expect(Time.parse(json_response['finished_at'])).to be_like_time(job.finished_at) expect(Time.parse(json_response['artifacts_expire_at'])).to be_like_time(job.artifacts_expire_at) expect(json_response['duration']).to eq(job.duration) + expect(json_response['web_url']).to be_present end it 'returns pipeline data' do diff --git a/spec/requests/api/pipelines_spec.rb b/spec/requests/api/pipelines_spec.rb index e2ca27f5d41..342a97b6a69 100644 --- a/spec/requests/api/pipelines_spec.rb +++ b/spec/requests/api/pipelines_spec.rb @@ -24,7 +24,8 @@ describe API::Pipelines do expect(json_response).to be_an Array expect(json_response.first['sha']).to match /\A\h{40}\z/ expect(json_response.first['id']).to eq pipeline.id - expect(json_response.first.keys).to contain_exactly(*%w[id sha ref status]) + expect(json_response.first['web_url']).to be_present + expect(json_response.first.keys).to contain_exactly(*%w[id sha ref status web_url]) end context 'when parameter is passed' do |