/
instagram.tags.coffee
29 lines (25 loc) · 1.04 KB
/
instagram.tags.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
###
Testing Tag Methods
###
console.log "\nInstagram API Node.js Lib Tests :: Tags"
Instagram = require '../lib/class.instagram'
assert = require 'assert'
should = require 'should'
test_helper = require './helpers.js'
module.exports =
'tags#info for blue': ->
test_helper 'tags#info for blue', Instagram, 'tags', 'info', { name: 'blue' }, (data) ->
data.should.have.property 'name', 'blue'
data.media_count.should.be.above 0
'tags#recent for blue': ->
test_helper 'tags#recent for blue', Instagram, 'tags', 'recent', { name: 'blue' }, (data, pagination) ->
data.length.should.equal 20
data[0].should.have.property 'id'
pagination.should.have.property 'next_url'
pagination.should.have.property 'next_max_id'
pagination.should.have.property 'next_min_id'
'tags#search for blue': ->
test_helper 'tags#search for blue', Instagram, 'tags', 'search', { q: 'blue' }, (data) ->
data.length.should.equal 50
data[0].should.have.property 'name', 'blue'
data[0].media_count.should.be.above 0