         error err, req, res, next
 
     it 'should respond 403', ->
-      res.send.should.have.been.calledWith 403
+      res.status.should.have.been.calledWith 403
 
     it 'should respond "Forbidden"', ->
-      res.send.should.have.been.calledWith sinon.match.number, 'Forbidden'
+      send.should.have.been.calledWith 'Forbidden'
 
 
 


        req = {}

        res =
          status: sinon.spy()
          json: sinon.spy()
          set: sinon.spy (headers) -> res.headers = headers
          render: sinon.spy()
          redirect: sinon.spy()

        error err, req, res, next

    it 'should respond 401', ->
      res.status.should.have.been.calledWith 401

    it 'should respond "Unauthorized"', ->
      send.should.have.been.calledWith 'Unauthorized'

    it 'should challenge to authenticate', ->
      res.headers['WWW-Authenticate'].should.be.defined
