mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
9a0dd31d8c
Remove deprecated domain license code GitOrigin-RevId: c9eebe1a657b07b69d618cdb5e73b64782109714
28 lines
799 B
CoffeeScript
28 lines
799 B
CoffeeScript
sinon = require('sinon')
|
|
chai = require('chai')
|
|
should = chai.should()
|
|
modulePath = "../../../../app/js/Features/User/UserHandler.js"
|
|
SandboxedModule = require('sandboxed-module')
|
|
|
|
describe "UserHandler", ->
|
|
|
|
beforeEach ->
|
|
@user =
|
|
_id:"12390i"
|
|
email: "bob@bob.com"
|
|
remove: sinon.stub().callsArgWith(0)
|
|
|
|
@TeamInvitesHandler =
|
|
createTeamInvitesForLegacyInvitedEmail: sinon.stub().yields()
|
|
|
|
@UserHandler = SandboxedModule.require modulePath, requires:
|
|
"../Subscription/TeamInvitesHandler": @TeamInvitesHandler
|
|
|
|
describe "populateTeamInvites", ->
|
|
beforeEach (done)->
|
|
@UserHandler.populateTeamInvites @user, done
|
|
|
|
it "notifies the user about legacy team invites", ->
|
|
@TeamInvitesHandler.createTeamInvitesForLegacyInvitedEmail
|
|
.calledWith(@user.email).should.eq true
|
|
|