Skip to content

Commit 736f5e9

Browse files
committed
tests/api-token: Fix timezone issues
1 parent 45af034 commit 736f5e9

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

tests/acceptance/api-token-test.js

+8-3
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,13 @@ module('Acceptance | api-tokens', function(hooks) {
3131

3232
context.server.get('/api/v1/me/tokens', {
3333
api_tokens: [
34-
{ id: 2, name: 'BAR', created_at: '2017-11-19T17:59:22Z', last_used_at: null },
35-
{ id: 1, name: 'foo', created_at: '2017-08-01T12:34:56Z', last_used_at: '2017-11-02T01:45:14Z' },
34+
{ id: 2, name: 'BAR', created_at: new Date('2017-11-19T17:59:22').toISOString(), last_used_at: null },
35+
{
36+
id: 1,
37+
name: 'foo',
38+
created_at: new Date('2017-08-01T12:34:56').toISOString(),
39+
last_used_at: new Date('2017-11-02T01:45:14').toISOString(),
40+
},
3641
],
3742
});
3843
}
@@ -46,7 +51,7 @@ module('Acceptance | api-tokens', function(hooks) {
4651

4752
let [row1, row2] = findAll('[data-test-api-token]');
4853
assert.dom('[data-test-name]', row1).hasText('BAR');
49-
assert.dom('[data-test-created-at]', row1).hasText('Created 17 hours ago');
54+
assert.dom('[data-test-created-at]', row1).hasText('Created 18 hours ago');
5055
assert.dom('[data-test-last-used-at]', row1).hasText('Never used');
5156
assert.dom('[data-test-save-token-button]', row1).doesNotExist();
5257
assert.dom('[data-test-revoke-token-button]', row1).exists();

0 commit comments

Comments
 (0)