mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-21 04:52:47 -05:00
13ca4a6174
AuthModal spec was loading the G+ API during tests, which caused G+ to get unhappy when CreateAccountModal mocked it.
25 lines
684 B
CoffeeScript
25 lines
684 B
CoffeeScript
AuthModal = require 'views/core/AuthModal'
|
|
RecoverModal = require 'views/core/RecoverModal'
|
|
|
|
describe 'AuthModal', ->
|
|
|
|
modal = null
|
|
|
|
beforeEach ->
|
|
application.facebookHandler.fakeAPI()
|
|
application.gplusHandler.fakeAPI()
|
|
modal = new AuthModal()
|
|
modal.render()
|
|
|
|
afterEach ->
|
|
modal.stopListening()
|
|
|
|
it 'opens the recover modal when you click the recover link', ->
|
|
spyOn(modal, 'openModalView')
|
|
modal.$el.find('#link-to-recover').click()
|
|
expect(modal.openModalView.calls.count()).toEqual(1)
|
|
args = modal.openModalView.calls.argsFor(0)
|
|
expect(args[0] instanceof RecoverModal).toBeTruthy()
|
|
|
|
it '(demo)', ->
|
|
jasmine.demoModal(modal)
|