Mailspring/spec-nylas/stores/focused-contacts-store-spec.coffee

26 lines
753 B
CoffeeScript
Raw Normal View History

proxyquire = require 'proxyquire'
Reflux = require 'reflux'
MessageStoreStub = Reflux.createStore
items: -> []
2015-07-24 02:32:13 +08:00
extensions: -> []
threadId: -> null
AccountStoreStub = Reflux.createStore
current: -> null
FocusedContactsStore = proxyquire '../../src/flux/stores/focused-contacts-store',
"./message-store": MessageStoreStub
"./account-store": AccountStoreStub
describe "FocusedContactsStore", ->
beforeEach ->
FocusedContactsStore._currentThreadId = null
FocusedContactsStore._clearCurrentParticipants(silent: true)
it "returns no contacts with empty", ->
expect(FocusedContactsStore.sortedContacts()).toEqual []
it "returns no focused contact when empty", ->
expect(FocusedContactsStore.focusedContact()).toBeNull()