diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2018-10-12 18:26:04 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-10-12 18:26:04 +0300 |
commit | 85c30d742cec72466389a77a2df8d42e3c0075d7 (patch) | |
tree | 7767326e049637ae399ca2b2d2a198d4e70cde60 /spec | |
parent | fbec87b4b578f048408d4b969ad8db3f3a51f22e (diff) |
Updates the check for started in job header
The function that was checking if the job was started or not
was expecting a boolean, however it was receiving a null.
During the refactor the condition was changed, causing the function
to break with null
This commit fixes the check
Diffstat (limited to 'spec')
-rw-r--r-- | spec/javascripts/jobs/store/getters_spec.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/javascripts/jobs/store/getters_spec.js b/spec/javascripts/jobs/store/getters_spec.js index 160b2f4b34a..e262a47b837 100644 --- a/spec/javascripts/jobs/store/getters_spec.js +++ b/spec/javascripts/jobs/store/getters_spec.js @@ -77,18 +77,18 @@ describe('Job Store Getters', () => { }); }); - describe('jobHasStarted', () => { - describe('when started equals false', () => { + describe('shouldRenderTriggeredLabel', () => { + describe('when started equals null', () => { it('returns false', () => { - localState.job.started = false; - expect(getters.jobHasStarted(localState)).toEqual(false); + localState.job.started = null; + expect(getters.shouldRenderTriggeredLabel(localState)).toEqual(false); }); }); describe('when started equals string', () => { it('returns true', () => { localState.job.started = '2018-08-31T16:20:49.023Z'; - expect(getters.jobHasStarted(localState)).toEqual(true); + expect(getters.shouldRenderTriggeredLabel(localState)).toEqual(true); }); }); }); |