Fix email tests

This commit is contained in:
phoenixeliot 2016-06-06 16:00:46 -07:00
parent 81d9e19221
commit fcb2ce8504
2 changed files with 5 additions and 5 deletions

View file

@ -461,7 +461,7 @@ describe 'POST /db/article/:handle/new-version', ->
it 'notifies watchers of changes', utils.wrap (done) ->
sendwithus = require '../../../server/sendwithus'
spyOn(sendwithus.api, 'send').and.callFake (context, cb) ->
expect(context.email_id).toBe(sendwithus.templates.change_made_notify_watcher)
expect(context.email_id).toBe(sendwithus.templates.change_made_notify_watcher.id)
expect(context.recipient.address).toBe('test@gmail.com')
done()
user = yield User({email: 'test@gmail.com', name: 'a user'}).save()

View file

@ -375,7 +375,7 @@ describe 'POST /db/classroom/:id/invite-members', ->
data = { emails: ['test@test.com'] }
sendwithus = require '../../../server/sendwithus'
spyOn(sendwithus.api, 'send').and.callFake (context, cb) ->
expect(context.email_id).toBe(sendwithus.templates.course_invite_email)
expect(context.email_id).toBe(sendwithus.templates.course_invite_email.id)
expect(context.recipient.address).toBe('test@test.com')
expect(context.email_data.teacher_name).toBe('Mr Professerson')
done()