Skip to content

Commit d20932d

Browse files
committed
fixed test cases
1 parent 5484294 commit d20932d

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

test/integration/users.test.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ const chaiHttp = require("chai-http");
44
const firestore = require("../../utils/firestore");
55
const app = require("../../server");
66
const authService = require("../../services/authService");
7-
const sinon = require("sinon");
8-
const controller = require("../../controllers/users");
97
const addUser = require("../utils/addUser");
108
const profileDiffs = require("../../models/profileDiffs");
119
const cleanDb = require("../utils/cleanDb");
@@ -1055,13 +1053,6 @@ describe("Users", function () {
10551053
});
10561054
});
10571055
it("Should update the user", async function () {
1058-
// Create a stub for the migrate function
1059-
const migrateStub = sinon.stub(controller, "migrate");
1060-
// Define the desired behavior of the stub
1061-
migrateStub.returns(userData[0]).resolves({
1062-
empty: true,
1063-
forEach: sinon.stub(),
1064-
});
10651056
const usersMigrateResponse = await chai
10661057
.request(app)
10671058
.post(`/users/migrate`)
@@ -1079,8 +1070,6 @@ describe("Users", function () {
10791070
usersReponse.body.users.forEach((document) => {
10801071
expect(document).to.have.property(`github_user_id`);
10811072
});
1082-
// Restore the original migrate function
1083-
migrateStub.restore();
10841073
});
10851074
it("Should return unauthorized error when not logged in", function (done) {
10861075
chai

0 commit comments

Comments
 (0)