Browse Source

Add autoUpdater getFeedURL specs

Samuel Attard 8 years ago
parent
commit
450c181da3
1 changed files with 17 additions and 0 deletions
  1. 17 0
      spec/api-auto-updater-spec.js

+ 17 - 0
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()
+      })
+    })
   })
 }