Merge pull request #2563 from overleaf/jel-add-affiliation-when-registering
Add affiliation when registering GitOrigin-RevId: e1915bbdc0a4fef399ef9b4a2154ede31e282cc3
This commit is contained in:
@@ -123,18 +123,6 @@ describe('UserCreator', function() {
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
it('should not add affiliation if skipping', function(done) {
|
||||
const attributes = { email: this.email }
|
||||
const options = { skip_affiliation: true }
|
||||
this.UserCreator.createNewUser(attributes, options, (err, user) => {
|
||||
assert.ifError(err)
|
||||
process.nextTick(() => {
|
||||
sinon.assert.notCalled(this.addAffiliation)
|
||||
done()
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('with promises', function() {
|
||||
@@ -156,13 +144,6 @@ describe('UserCreator', function() {
|
||||
sinon.assert.calledWithMatch(this.addAffiliation, user._id, this.email)
|
||||
})
|
||||
|
||||
it('should not add affiliation if skipping', async function() {
|
||||
const attributes = { email: this.email }
|
||||
const opts = { skip_affiliation: true }
|
||||
await this.UserCreator.promises.createNewUser(attributes, opts)
|
||||
sinon.assert.notCalled(this.addAffiliation)
|
||||
})
|
||||
|
||||
it('should include SAML provider ID with email', async function() {
|
||||
const attributes = {
|
||||
email: this.email,
|
||||
|
||||
Reference in New Issue
Block a user