fix(specs)

This commit is contained in:
Ben Gotow 2016-05-04 11:50:54 -07:00
parent 7dfe5d55ae
commit 54427ccb9d

View file

@ -75,8 +75,9 @@ describe "FocusedPerspectiveStore", ->
expect(FocusedPerspectiveStore.trigger).toHaveBeenCalled()
expect(FocusedPerspectiveStore.current().categories()).toEqual([@userCategory])
it "should do nothing if the category is already focused", ->
FocusedPerspectiveStore._onFocusPerspective(@inboxPerspective)
spyOn(FocusedPerspectiveStore, '_setPerspective')
FocusedPerspectiveStore._onFocusPerspective(@inboxPerspective)
expect(FocusedPerspectiveStore._setPerspective).not.toHaveBeenCalled()
describe "_setPerspective", ->
it "should not trigger if the perspective is already focused", ->
FocusedPerspectiveStore._setPerspective(@inboxPerspective)
FocusedPerspectiveStore.trigger.reset()
FocusedPerspectiveStore._setPerspective(@inboxPerspective)
expect(FocusedPerspectiveStore.trigger).not.toHaveBeenCalled()