Skip to content

Commit

Permalink
Fix credential creations test
Browse files Browse the repository at this point in the history
  • Loading branch information
XVincentX committed Oct 26, 2017
1 parent 9a45dc2 commit 4cea5a4
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions test/cli/credentials/create.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ describe('eg credentials create', () => {
firstname: 'La',
lastname: 'Deeda'
})
.then(createdUser => {
user = createdUser;
});
.then(createdUser => {
user = createdUser;
});
});

afterEach(() => {
Expand Down Expand Up @@ -55,13 +55,13 @@ describe('eg credentials create', () => {
assert.equal(text, 'Created ' + loggedCred.keyId);

return adminHelper.admin.credentials.info(loggedCred.keyId, 'key-auth')
.then(cred => {
assert.ok(cred.keyId);
assert.ok(cred.keySecret);
assert.ok(cred.isActive);
assert.equal(cred.consumerId, user.username);
done();
}).catch(done);
.then(cred => {
assert.ok(cred.keyId);
assert.ok(cred.keySecret);
assert.ok(cred.isActive);
assert.equal(cred.consumerId, user.id);
done();
}).catch(done);
});
});

Expand Down Expand Up @@ -95,13 +95,13 @@ describe('eg credentials create', () => {
const loggedCred = JSON.parse(output);
assert.equal(text, 'Created ' + loggedCred.keyId);
return adminHelper.admin.credentials.info(loggedCred.keyId, 'key-auth')
.then(cred => {
assert.ok(cred.keyId);
assert.ok(cred.keySecret);
assert.ok(cred.isActive);
assert.equal(cred.consumerId, user.username);
done();
}).catch(done);
.then(cred => {
assert.ok(cred.keyId);
assert.ok(cred.keySecret);
assert.ok(cred.isActive);
assert.equal(cred.consumerId, user.id);
done();
}).catch(done);
});
});

Expand All @@ -124,15 +124,15 @@ describe('eg credentials create', () => {
generator.once('end', () => {
const loggedCred = output.split(':')[0];
return adminHelper.admin.credentials.info(loggedCred, 'key-auth')
.then(cred => {
assert.ok(cred.keyId);
assert.ok(cred.keySecret);
assert.ok(cred.isActive);
assert.equal(cred.consumerId, user.username);
assert.equal(output, cred.keyId + ':' + cred.keySecret);

done();
}).catch(done);
.then(cred => {
assert.ok(cred.keyId);
assert.ok(cred.keySecret);
assert.ok(cred.isActive);
assert.equal(cred.consumerId, user.id);
assert.equal(output, cred.keyId + ':' + cred.keySecret);

done();
}).catch(done);
});
});

Expand Down

0 comments on commit 4cea5a4

Please sign in to comment.