mirror of
https://github.com/atom/atom.git
synced 2026-01-24 22:38:20 -05:00
Fix platformSupportsUpdates() specs
This commit is contained in:
@@ -65,32 +65,24 @@ describe('AutoUpdateManager (renderer)', () => {
|
||||
})
|
||||
|
||||
describe('::platformSupportsUpdates', () => {
|
||||
let platform, releaseChannel
|
||||
let state, releaseChannel
|
||||
it('returns true on OS X and Windows, when in stable', () => {
|
||||
spyOn(autoUpdateManager, 'getPlatform').andCallFake(() => platform)
|
||||
spyOn(autoUpdateManager, 'getState').andCallFake(() => state)
|
||||
spyOn(autoUpdateManager, 'getReleaseChannel').andCallFake(() => releaseChannel)
|
||||
|
||||
platform = 'win32'
|
||||
state = 'idle'
|
||||
releaseChannel = 'stable'
|
||||
expect(autoUpdateManager.platformSupportsUpdates()).toBe(true)
|
||||
|
||||
platform = 'win32'
|
||||
state = 'idle'
|
||||
releaseChannel = 'dev'
|
||||
expect(autoUpdateManager.platformSupportsUpdates()).toBe(false)
|
||||
|
||||
platform = 'darwin'
|
||||
releaseChannel = 'stable'
|
||||
expect(autoUpdateManager.platformSupportsUpdates()).toBe(true)
|
||||
|
||||
platform = 'darwin'
|
||||
releaseChannel = 'dev'
|
||||
expect(autoUpdateManager.platformSupportsUpdates()).toBe(false)
|
||||
|
||||
platform = 'linux'
|
||||
state = 'unsupported'
|
||||
releaseChannel = 'stable'
|
||||
expect(autoUpdateManager.platformSupportsUpdates()).toBe(false)
|
||||
|
||||
platform = 'linux'
|
||||
state = 'unsupported'
|
||||
releaseChannel = 'dev'
|
||||
expect(autoUpdateManager.platformSupportsUpdates()).toBe(false)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user