Mailspring/spec-nylas/stores/focused-contacts-store-spec.coffee
2015-07-23 11:32:13 -07:00

25 lines
759 B
CoffeeScript

proxyquire = require 'proxyquire'
Reflux = require 'reflux'
MessageStoreStub = Reflux.createStore
items: -> []
extensions: -> []
threadId: -> null
NamespaceStoreStub = Reflux.createStore
current: -> null
FocusedContactsStore = proxyquire '../../src/flux/stores/focused-contacts-store',
"./message-store": MessageStoreStub
"./namespace-store": NamespaceStoreStub
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()