summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorKrasimir Angelov <kangelov@gitlab.com>2019-08-14 14:17:13 +0300
committerKrasimir Angelov <kangelov@gitlab.com>2019-08-15 10:53:48 +0300
commit18159235a3150dbd3c404e1d7724d5e653bb21a5 (patch)
tree3d1e2175950ed4a9964ace94fdfb72f8ab98ce61 /spec
parent94cf543fe3909a0a12771765a85c3c596f318046 (diff)
downloadgitlab-ce-18159235a3150dbd3c404e1d7724d5e653bb21a5.tar.gz
Add finished_at to the internal API Deployment entity56130-deployment-date
Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/56130.
Diffstat (limited to 'spec')
-rw-r--r--spec/fixtures/api/schemas/deployment.json2
-rw-r--r--spec/serializers/deployment_entity_spec.rb4
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) }