Merge pull request #2563 from overleaf/jel-add-affiliation-when-registering

Add affiliation when registering

GitOrigin-RevId: e1915bbdc0a4fef399ef9b4a2154ede31e282cc3
This commit is contained in:
Jessica Lawshe
2020-02-12 04:21:10 +00:00
committed by Copybot
parent 222ba263ff
commit 528b2b5728
3 changed files with 12 additions and 41 deletions
@@ -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,