Skip to content

Commit

Permalink
test: fix async to use done
Browse files Browse the repository at this point in the history
  • Loading branch information
Felipe Parreira committed Sep 11, 2020
1 parent 2af11bb commit 6276e0b
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions tests/end-to-end/api/01-users.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,22 +348,22 @@ describe('[Users]', function() {
.expect((res) => {
expect(res.body).to.have.property('success', true);
})
.end(done);

request.get(api('users.info'))
.set(credentials)
.query({
username: 'ufs',
})
.expect(200)
.expect((res) => {
expect(res.body).to.have.property('success', true);
expect(res.body.user).to.have.property('type', 'user');
expect(res.body.user).to.have.property('name', 'testuser');
expect(res.body.user).to.have.property('username', 'ufs');
expect(res.body.user).to.have.property('active', true);
})
.end(done);
.then(() => {
request.get(api('users.info'))
.set(credentials)
.query({
username: 'ufs',
})
.expect(200)
.expect((res) => {
expect(res.body).to.have.property('success', true);
expect(res.body.user).to.have.property('type', 'user');
expect(res.body.user).to.have.property('name', 'testuser');
expect(res.body.user).to.have.property('username', 'ufs');
expect(res.body.user).to.have.property('active', true);
})
.end(done);
});
});
});
describe('[/users.getPresence]', () => {
Expand Down

0 comments on commit 6276e0b

Please sign in to comment.