 
       clientId = 1
 
-      middleware = firstPage(clientId)
+      middleware = firstPage clientId
       middleware.should.be.a.Function
       done()
+
+    it 'should insert instagram json response in the request object', (done) ->
+
+      clientId = 1
+      userId = 1
+
+      middleware = firstPage clientId, userId
+      middleware req, res, ->
+
+        req.instagram.firstPage.should.be.an.Object
+        done()
 
   describe '#allPages()', ->
 


should = require 'should'
proxy = require '../dist/connect-instagram-proxy'

describe 'connect-instagram-proxy', ->

  describe '#firstPage()', ->



      middleware = allPages(clientId)
      middleware.should.be.a.Function
      done()

      it 'should concatenate all pages in the instagram api'