summaryrefslogtreecommitdiff
path: root/spec/javascripts/environments
diff options
context:
space:
mode:
authorjakeburden <jburden@gitlab.com>2019-08-21 14:58:04 -0400
committerjakeburden <jburden@gitlab.com>2019-08-28 08:48:14 -0400
commita3edfab1a9fcfdab56d2f2d29fa9f72ce0455ee4 (patch)
treed3eb7bbe85a789d72e2cb2296431ac0130f5be41 /spec/javascripts/environments
parentef0f1509dd2a2a3ba5798362e2be21108b705a85 (diff)
downloadgitlab-ce-a3edfab1a9fcfdab56d2f2d29fa9f72ce0455ee4.tar.gz
Only display time if the job has deployed Update JS tests for displaying job deployment time Simplify boolean check in deployedDate
Diffstat (limited to 'spec/javascripts/environments')
-rw-r--r--spec/javascripts/environments/environment_item_spec.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/javascripts/environments/environment_item_spec.js b/spec/javascripts/environments/environment_item_spec.js
index 388d7063d13..f9ee4648128 100644
--- a/spec/javascripts/environments/environment_item_spec.js
+++ b/spec/javascripts/environments/environment_item_spec.js
@@ -106,6 +106,7 @@ describe('Environment item', () => {
play_path: '/play',
},
],
+ deployed_at: '2016-11-29T18:11:58.430Z',
},
has_stop_action: true,
environment_path: 'root/ci-folders/environments/31',
@@ -139,9 +140,7 @@ describe('Environment item', () => {
it('should render last deployment date', () => {
const timeagoInstance = new timeago(); // eslint-disable-line
- const formatedDate = timeagoInstance.format(
- environment.last_deployment.deployable.created_at,
- );
+ const formatedDate = timeagoInstance.format(environment.last_deployment.deployed_at);
expect(
component.$el.querySelector('.environment-created-date-timeago').textContent,