Skip to content
This repository was archived by the owner on Dec 10, 2024. It is now read-only.

Commit 539ea71

Browse files
committed
added test for developer-mode
1 parent 7d8141e commit 539ea71

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

test/feedly.test.coffee

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ q = require 'q'
55
Feedly = require '../lib/feedly'
66

77
FEEDLY_SECRET = process.env.FEEDLY_SECRET
8+
FEEDLY_DEVELOPER = process.env.FEEDLY_DEVELOPER
89
if !FEEDLY_SECRET?
910
throw new Error("Specify the client secret in the FEEDLY_SECRET environment variable")
11+
if !FEEDLY_DEVELOPER?
12+
throw new Error("Specify the developer token in the FEEDLY_DEVELOPER environment variable")
1013

1114
FEED_URL = 'http://blog.foodnetwork.com/fn-dish/feed/'
1215
FEED = "feed/#{FEED_URL}"
@@ -173,3 +176,23 @@ module.exports =
173176
, (er) ->
174177
console.log 'ERROR', er, er.stack
175178
test.ifError er
179+
180+
feedsProd: (testprod)->
181+
f = new Feedly
182+
client_id: 'sandbox'
183+
client_secret: FEEDLY_DEVELOPER
184+
developer: true
185+
base: 'https://cloud.feedly.com'
186+
port: 8080
187+
config_file: CONFIG
188+
189+
testprod.ok f
190+
testprod.equals f.options.base, 'https://cloud.feedly.com'
191+
f.categories()
192+
.then (categories) ->
193+
testprod.ok categories
194+
.then ->
195+
testprod.done()
196+
, (er) ->
197+
console.log 'ERROR', er, er.stack
198+
testprod.ifError er

0 commit comments

Comments
 (0)