From 450c181da3de4fae51ab0114612a42dce852a70b Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Fri, 15 Jul 2016 10:13:41 +1200 Subject: [PATCH] Add autoUpdater getFeedURL specs --- spec/api-auto-updater-spec.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/spec/api-auto-updater-spec.js b/spec/api-auto-updater-spec.js index f3c897865b88..f93590ccadd4 100644 --- a/spec/api-auto-updater-spec.js +++ b/spec/api-auto-updater-spec.js @@ -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() + }) + }) }) }