|
@@ -29,6 +29,25 @@ describe('autoUpdater module', function () {
|
|
|
})
|
|
|
})
|
|
|
|
|
|
+ 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') {
|
|
|
+ // FIXME(alexeykuzmin): Skip the test.
|
|
|
+ // this.skip()
|
|
|
+ return done()
|
|
|
+ }
|
|
|
+
|
|
|
+ const updateURL = 'https://fake-update.electron.io'
|
|
|
+ autoUpdater.setFeedURL(updateURL)
|
|
|
+ assert.equal(autoUpdater.getFeedURL(), updateURL)
|
|
|
+ done()
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
describe('setFeedURL', function () {
|
|
|
describe('on Mac or Windows', () => {
|
|
|
const noThrow = (fn) => {
|
|
@@ -106,25 +125,6 @@ describe('autoUpdater module', function () {
|
|
|
})
|
|
|
})
|
|
|
|
|
|
- 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') {
|
|
|
- // FIXME(alexeykuzmin): Skip the test.
|
|
|
- // this.skip()
|
|
|
- return done()
|
|
|
- }
|
|
|
-
|
|
|
- const updateURL = 'https://fake-update.electron.io'
|
|
|
- autoUpdater.setFeedURL(updateURL)
|
|
|
- assert.equal(autoUpdater.getFeedURL(), updateURL)
|
|
|
- done()
|
|
|
- })
|
|
|
- })
|
|
|
-
|
|
|
describe('quitAndInstall', function () {
|
|
|
it('emits an error on Windows when no update is available', function (done) {
|
|
|
if (process.platform !== 'win32') {
|