From 9892473513728ad21a7f098f7b5677bad6b07abf Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Tue, 31 May 2016 17:05:17 -0700 Subject: [PATCH] fix(category-picker): Update specs for sorting --- .../category-picker/spec/category-picker-spec.cjsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal_packages/category-picker/spec/category-picker-spec.cjsx b/internal_packages/category-picker/spec/category-picker-spec.cjsx index 58c239e10..37591beb0 100644 --- a/internal_packages/category-picker/spec/category-picker-spec.cjsx +++ b/internal_packages/category-picker/spec/category-picker-spec.cjsx @@ -39,9 +39,10 @@ describe 'CategoryPickerPopover', -> @archiveCategory = new Category(id: 'id-456', name: 'archive', displayName: "ArCHIVe", accountId: TEST_ACCOUNT_ID) @userCategory = new Category(id: 'id-789', name: null, displayName: "MyCategory", accountId: TEST_ACCOUNT_ID) - spyOn(Categories, "forAccount").andReturn NylasTestUtils.mockObservable( - [@inboxCategory, @archiveCategory, @userCategory] - ) + observable = NylasTestUtils.mockObservable([@inboxCategory, @archiveCategory, @userCategory]) + observable.sort = () => observable + + spyOn(Categories, "forAccount").andReturn observable spyOn(CategoryStore, "getStandardCategory").andReturn @inboxCategory spyOn(AccountStore, "accountForItems").andReturn @account spyOn(Actions, "closePopover")