From 2e860f97ec52a2ea0101ba82f2d793e8aa1e1c47 Mon Sep 17 00:00:00 2001 From: Juan Tejada Date: Wed, 23 Mar 2016 18:10:15 -0700 Subject: [PATCH] fix(specs): Fix specs for account store token initialization --- spec/stores/account-store-spec.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/stores/account-store-spec.coffee b/spec/stores/account-store-spec.coffee index e32ea1529..d0e212e24 100644 --- a/spec/stores/account-store-spec.coffee +++ b/spec/stores/account-store-spec.coffee @@ -61,7 +61,6 @@ describe "AccountStore", -> expect(@instance.tokenForAccountId('A')).toEqual('A-TOKEN') expect(@instance.tokenForAccountId('B')).toEqual(undefined) expect(keytar.replacePassword).toHaveBeenCalledWith('Nylas', 'bengotow@gmail.com', 'A-TOKEN') - expect(NylasEnv.config.set).toHaveBeenCalledWith('nylas.accountTokens', null) it "should initialize tokens from keytar", -> @configTokens = null @@ -114,8 +113,9 @@ describe "AccountStore", -> account = (new Account).fromJSON(@json) expect(@instance._accounts.length).toBe 1 expect(@instance._accounts[0]).toEqual account + expect(NylasEnv.config.set.calls.length).toBe 3 + expect(NylasEnv.config.set.calls[2].args).toEqual(['nylas.accountTokens', null]) expect(NylasEnv.config.save).toHaveBeenCalled() - expect(NylasEnv.config.set.calls.length).toBe 2 it "selects the account", -> expect(Actions.focusDefaultMailboxPerspectiveForAccounts).toHaveBeenCalledWith(["B"])