fix(specs): Properly spy on streaming connection

- Prevent error logs and actually trying to start delta streaming
connections
This commit is contained in:
Juan Tejada 2016-07-28 12:40:02 -07:00
parent 796af843a0
commit 5f52a9a47b

View file

@ -43,11 +43,11 @@ describe "NylasSyncWorker", ->
return throw new Error("Not stubbed! #{key}")
spyOn(DeltaStreamingConnection.prototype, 'start')
@account = new Account(clientId: TEST_ACCOUNT_CLIENT_ID, serverId: TEST_ACCOUNT_ID, organizationUnit: 'label')
@worker = new NylasSyncWorker(@api, @account)
@worker._metadata = {"a": [{"id":"b"}]}
@connection = @worker.connection()
spyOn(@connection, 'start')
advanceClock()
it "should reset `busy` to false when reading state from disk", ->