Add autoUpdater getFeedURL specs

This commit is contained in:
Samuel Attard 2016-07-15 10:13:41 +12:00 committed by Samuel Attard
parent d42e6b3c1f
commit 450c181da3

View file

@ -33,5 +33,22 @@ if (!process.mas) {
autoUpdater.setFeedURL('')
})
})
describe('getFeedURL', function () {
it('returns a falsey value by default', function () {
assert.ok(!autoUpdater.getFeedURL())
})
it('correctly fetches the previously set FeedURL', function (done) {
if (process.platform !== 'win32') {
return done()
}
const updateURL = 'https://fake-update.electron.io'
autoUpdater.setFeedURL(updateURL)
assert.equal(autoUpdater.getFeedURL(), updateURL)
done()
})
})
})
}