diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2019-08-16 15:34:12 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2019-08-16 15:34:12 +0300 |
commit | 30b0dcb7599b0f90b46dfcc4586dcfc7c5232148 (patch) | |
tree | 8134097a30828b86c204d38377aab00154e18c92 /spec | |
parent | b1604f7d8f0095d637036721244830e8d3181596 (diff) | |
parent | 18159235a3150dbd3c404e1d7724d5e653bb21a5 (diff) |
Merge branch '56130-deployment-date' into 'master'
Expose finished_at for the Deployment entity
See merge request gitlab-org/gitlab-ce!31808
Diffstat (limited to 'spec')
-rw-r--r-- | spec/fixtures/api/schemas/deployment.json | 2 | ||||
-rw-r--r-- | spec/serializers/deployment_entity_spec.rb | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/spec/fixtures/api/schemas/deployment.json b/spec/fixtures/api/schemas/deployment.json index 0828f113495..9216ad0060b 100644 --- a/spec/fixtures/api/schemas/deployment.json +++ b/spec/fixtures/api/schemas/deployment.json @@ -3,6 +3,7 @@ "required": [ "sha", "created_at", + "finished_at", "iid", "tag", "last?", @@ -11,6 +12,7 @@ ], "properties": { "created_at": { "type": "string" }, + "finished_at": { "type": ["string", "null"] }, "id": { "type": "integer" }, "iid": { "type": "integer" }, "last?": { "type": "boolean" }, diff --git a/spec/serializers/deployment_entity_spec.rb b/spec/serializers/deployment_entity_spec.rb index 76ad2aee5c5..c0ea2b3c389 100644 --- a/spec/serializers/deployment_entity_spec.rb +++ b/spec/serializers/deployment_entity_spec.rb @@ -32,6 +32,10 @@ describe DeploymentEntity do expect(subject).to include(:created_at) end + it 'exposes finished_at' do + expect(subject).to include(:finished_at) + end + context 'when the pipeline has another manual action' do let(:other_build) { create(:ci_build, :manual, name: 'another deploy', pipeline: pipeline) } let!(:other_deployment) { create(:deployment, deployable: other_build) } |