Skip to content

Commit

Permalink
Log in test user
Browse files Browse the repository at this point in the history
  • Loading branch information
sampaiodiego committed Aug 4, 2022
1 parent a4559de commit f19d2a9
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions apps/meteor/tests/end-to-end/api/01-users.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ describe('[Users]', function () {
before((done) => clearCustomFields(done));
after((done) => clearCustomFields(done));

it('should create a new user', (done) => {
request
it('should create a new user', async () => {
await request
.post(api('users.create'))
.set(credentials)
.send({
Expand All @@ -120,8 +120,16 @@ describe('[Users]', function () {

targetUser._id = res.body.user._id;
targetUser.username = res.body.user.username;
});

await request
.post(api('login'))
.send({
user: apiUsername,
password,
})
.end(done);
.expect('Content-Type', 'application/json')
.expect(200);
});

it('should create a new user with custom fields', (done) => {
Expand Down

0 comments on commit f19d2a9

Please sign in to comment.