diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-10-18 10:03:17 +0100 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-10-18 10:03:17 +0100 |
commit | 8e8e3441c3e4c734f7104fb0a10781836659ed95 (patch) | |
tree | c2d4072d215a13d1b2c113eb89e9fe3ff3d62d85 | |
parent | f5beab30fc9292e508b2864a14191b75b1eb1d26 (diff) | |
download | gitlab-ce-38986-due-date.tar.gz |
Adds missing tests38986-due-date
-rw-r--r-- | spec/javascripts/lib/utils/datefix_spec.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/javascripts/lib/utils/datefix_spec.js b/spec/javascripts/lib/utils/datefix_spec.js index 827c9664611..0b9fde2be67 100644 --- a/spec/javascripts/lib/utils/datefix_spec.js +++ b/spec/javascripts/lib/utils/datefix_spec.js @@ -1,4 +1,4 @@ -import { pad } from '~/lib/utils/datefix'; +import { pad, parsePikadayDate, pikadayToString } from '~/lib/utils/datefix'; describe('datefix', () => { describe('pad', () => { @@ -14,4 +14,16 @@ describe('datefix', () => { expect(pad(12, 3)).toEqual('012'); }); }); + + describe('parsePikadayDate', () => { + it('should return a UTC date', () => { + expect(parsePikadayDate('2020-01-29')).toEqual(new Date('2020-01-29')); + }); + }); + + describe('pikadayToString', () => { + it('should format a UTC date into yyyy-mm-dd format', () => { + expect(pikadayToString(new Date('2020-01-29'))).toEqual('2020-01-29'); + }); + }); }); |