Ensure getErrorMessage() works properly

This commit is contained in:
Antonio Scandurra
2016-04-01 09:06:32 +02:00
parent 4d4ee6bf3b
commit fa469121d8

View File

@@ -68,8 +68,9 @@ describe('AutoUpdateManager (renderer)', () => {
it('subscribes to "update-error" event', () => {
const spy = jasmine.createSpy('spy')
autoUpdateManager.onUpdateError(spy)
electronAutoUpdater.emit('error', {}, 'an error')
electronAutoUpdater.emit('error', {}, 'an error message')
waitsFor(() => spy.callCount === 1)
runs(() => expect(autoUpdateManager.getErrorMessage()).toBe('an error message'))
})
})