Skip to content

Commit 9569688

Browse files
committed
fixed sinon.stub and resolves method
1 parent ae3bfd8 commit 9569688

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/integration/users.test.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1067,7 +1067,10 @@ describe("Users", function () {
10671067
totalCount: 0,
10681068
},
10691069
});
1070-
sinon.stub(controller, "migrate").returns(userData[0]);
1070+
sinon.stub(controller, "migrate").returns(userData[0]).resolves({
1071+
empty: true,
1072+
forEach: sinon.stub(),
1073+
});
10711074
const usersReponse = await chai.request(app).get(`/users`).set("cookie", `${cookieName}=${superUserAuthToken}`);
10721075
expect(usersReponse).to.have.status(200);
10731076
usersReponse.body.users.forEach((document) => {

0 commit comments

Comments
 (0)