forked from RocketChat/Rocket.Chat
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: turn test callback synchronous
- Loading branch information
Felipe Parreira
committed
Sep 11, 2020
1 parent
2c4eeb0
commit 2af11bb
Showing
1 changed file
with
7 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -335,8 +335,8 @@ describe('[Users]', function() { | |
}); | ||
}); | ||
|
||
it('should correctly route users that have `ufs` in their username', async () => { | ||
await request.post(api('users.create')) | ||
it('should correctly route users that have `ufs` in their username', (done) => { | ||
request.post(api('users.create')) | ||
.set(credentials) | ||
.send({ | ||
email: '[email protected]', | ||
|
@@ -347,9 +347,10 @@ describe('[Users]', function() { | |
.expect(200) | ||
.expect((res) => { | ||
expect(res.body).to.have.property('success', true); | ||
}); | ||
}) | ||
.end(done); | ||
|
||
await request.get(api('users.info')) | ||
request.get(api('users.info')) | ||
.set(credentials) | ||
.query({ | ||
username: 'ufs', | ||
|
@@ -361,7 +362,8 @@ describe('[Users]', function() { | |
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]', () => { | ||
|