mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-11 02:30:21 +08:00
fix(spec): fix nylas api specs
This commit is contained in:
parent
21059fed3c
commit
6cb2791642
1 changed files with 2 additions and 2 deletions
|
@ -51,14 +51,14 @@ describe "NylasAPI", ->
|
|||
spyOn(Actions, 'postNotification')
|
||||
NylasAPI._handleAuthenticationFailure('/threads/1234', 'token')
|
||||
expect(Actions.postNotification).toHaveBeenCalled()
|
||||
expect(Actions.postNotification.mostRecentCall.args[0].message.trim()).toEqual("Nylas N1 can no longer authenticate with your mail provider. You will not be able to send or receive mail. Please click here to reconnect your account.")
|
||||
expect(Actions.postNotification.mostRecentCall.args[0].message.trim()).toEqual("Action failed: There was an error syncing with your mail provider. You may not be able to send or receive mail.")
|
||||
|
||||
it "should include the email address if possible", ->
|
||||
spyOn(AccountStore, 'tokenForAccountId').andReturn('token')
|
||||
spyOn(Actions, 'postNotification')
|
||||
NylasAPI._handleAuthenticationFailure('/threads/1234', 'token')
|
||||
expect(Actions.postNotification).toHaveBeenCalled()
|
||||
expect(Actions.postNotification.mostRecentCall.args[0].message.trim()).toEqual("Nylas N1 can no longer authenticate with #{AccountStore.accounts()[0].emailAddress}. You will not be able to send or receive mail. Please click here to reconnect your account.")
|
||||
expect(Actions.postNotification.mostRecentCall.args[0].message.trim()).toEqual("Action failed: There was an error syncing with #{AccountStore.accounts()[0].emailAddress}. You may not be able to send or receive mail.")
|
||||
|
||||
describe "handleModelResponse", ->
|
||||
beforeEach ->
|
||||
|
|
Loading…
Reference in a new issue