Skip to content

Commit 08bbd7c

Browse files
committed
Resolving conflicts with both branches
1 parent fcd694c commit 08bbd7c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/unit-tests/user/userCreateTest.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ const fakeLegacySavedObject = {
4545
}
4646
}
4747
const stubUser = {
48-
username: 'stubUser',
49-
org_UUID: stubOrgUUID
48+
username: 'stubUser'
49+
// org_UUID: stubOrgUUID
5050
}
5151

5252
const fakeUserMongooseDocument = new BaseUser(fakeBaseUserSavedObject)
@@ -104,6 +104,7 @@ describe('Testing the POST /org/:shortname/user endpoint in Org Controller', ()
104104
it('User is created', async () => {
105105
sinon.stub(baseUserRepo, 'orgHasUser').resolves(false)
106106
sinon.stub(baseUserRepo, 'isAdminOrSecretariat').resolves(true)
107+
sinon.stub(baseOrgRepo, 'getOrgUUID').resolves(true)
107108
sinon.stub(argon2, 'hash').resolves('hashedPassword')
108109
sinon.stub(BaseOrgRepository.prototype, 'findOneByShortName').resolves(fakeOrgMongooseDocument)
109110
sinon.stub(baseUserRepo, 'findUsersByOrgShortname').resolves([fakeUserMongooseDocument])
@@ -120,6 +121,7 @@ describe('Testing the POST /org/:shortname/user endpoint in Org Controller', ()
120121
it('User Fails to be created because not in the same org', async () => {
121122
sinon.stub(baseUserRepo, 'orgHasUser').resolves(false)
122123
sinon.stub(baseUserRepo, 'isAdminOrSecretariat').resolves(false)
124+
sinon.stub(baseOrgRepo, 'getOrgUUID').resolves(true)
123125
req.ctx.org = 'FakeShortName'
124126
await USER_CREATE_SINGLE(req, res, next)
125127
expect(status.args[0][0]).to.equal(403)

0 commit comments

Comments
 (0)