Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: f45a6db7ab
Fetching contributors…

Cannot retrieve contributors at this time

47 lines (38 sloc) 1.688 kb
Test Setup
console.log "\nInstagram API Node.js Lib Tests :: Geographies"
Init = require './initialize'
Instagram = Init.Instagram
app =
assert = require 'assert'
should = require 'should'
test = require './helpers'
completed = 0
to_do = 0
module.exports =
'geographies#subscriptions': ->
test.helper "geographies#subscriptions subscribe to geography near Eiffel Tower", Instagram, 'geographies', 'subscribe', { lat: 48.858844300000001, lng: 2.2943506, radius: 1000 }, (data) -> 'id'
test.output "data had the property 'id'" 0
test.output " was greater than 0", 'type', 'subscription'
test.output "data had the property 'type' equal to 'subscription'", data
subscription_id =
test.helper 'geographies#subscriptions list', Instagram, 'subscriptions', 'list', {}, (data) -> 0
test.output "data had length greater than 0", data.length
found = false
for i of data
found = true if data[i].id is subscription_id
throw "subscription not found" if !found
test.output "data had the subscription #{subscription_id}"
test.helper "geographies#subscriptions unsubscribe from media near Eiffel Tower", Instagram, 'geographies', 'unsubscribe', { id: subscription_id }, (data) ->
throw "geography near Eiffel Tower unsubscribe failed" if data isnt null
test.output "data was null; we unsubscribed from the subscription #{subscription_id}"
app.start_tests module.exports
Jump to Line
Something went wrong with that request. Please try again.