Skip to content

Commit

Permalink
Merge pull request #169 from screwdriver-cd/user-tokens
Browse files Browse the repository at this point in the history
fix(tokens): lastUsed defaults to empty string instead of null
  • Loading branch information
minzcmu authored Jun 2, 2017
2 parents e311419 + 6133237 commit dc5de96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/tokenFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class TokenFactory extends BaseFactory {
.then((bytes) => {
value = bytes;
config.hash = generateToken.hashValue(bytes);
config.lastUsed = null;
config.lastUsed = '';

return super.create(config);
}).then((model) => {
Expand Down
4 changes: 2 additions & 2 deletions test/lib/tokenFactory.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ describe('Token Factory', () => {
description,
name,
hash,
lastUsed: null
lastUsed: ''
};
const expected = {
userId,
name,
description,
hash,
lastUsed: null
lastUsed: ''
};
let TokenFactory;
let datastore;
Expand Down

0 comments on commit dc5de96

Please sign in to comment.