mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-11 18:32:20 +08:00
Fix AccountSwitcher specs
This commit is contained in:
parent
2c7626a355
commit
3138843748
1 changed files with 12 additions and 10 deletions
|
@ -1,21 +1,23 @@
|
|||
React = require 'react/addons'
|
||||
TestUtils = React.addons.TestUtils
|
||||
AccountSwitcher = require './../lib/account-switcher'
|
||||
AccountSidebarStore = require './../lib/account-sidebar-store'
|
||||
{AccountStore} = require 'nylas-exports'
|
||||
|
||||
describe "AccountSwitcher", ->
|
||||
fdescribe "AccountSwitcher", ->
|
||||
switcher = null
|
||||
|
||||
beforeEach ->
|
||||
spyOn(AccountStore, "accounts").andCallFake ->
|
||||
[
|
||||
AccountStore.current(),
|
||||
{
|
||||
emailAddress: "dillon@nylas.com",
|
||||
provider: "exchange"
|
||||
label: "work"
|
||||
}
|
||||
]
|
||||
account = AccountStore.accounts()[0]
|
||||
spyOn(AccountStore, "accounts").andReturn [
|
||||
account,
|
||||
{
|
||||
emailAddress: "dillon@nylas.com",
|
||||
provider: "exchange"
|
||||
label: "work"
|
||||
}
|
||||
]
|
||||
spyOn(AccountSidebarStore, "currentAccount").andReturn account
|
||||
|
||||
switcher = TestUtils.renderIntoDocument(
|
||||
<AccountSwitcher />
|
||||
|
|
Loading…
Reference in a new issue