             headers:
                 authorization: 'james-bond@mi6.cozy.uk:my_name_is_bond'
 
-        stubIsSharingAuthenticated = {}
+        stubIsAuthenticated = {}
 
         before (done) ->
-            stubIsSharingAuthenticated = sinon.stub remoteAccess,
-                'isSharingAuthenticated', (credentials, callback) ->
+            stubIsAuthenticated = sinon.stub remoteAccess,
+                'isAuthenticated', (credentials, callback) ->
                     callback false
 
             done()
 
         after (done) ->
-            stubIsSharingAuthenticated.restore()
+            stubIsAuthenticated.restore()
             done()
 
 

                err.should.deep.equal error
                done()

        it 'When a correct request is made then 200 is returned', (done) ->
            sharing.request req, res, ->
            res.on 'send', ->
                res.statusCode.should.equal 200
                done()


    describe 'revoke module', ->

        req = httpMocks.createRequest
            method : 'DELETE'

            headers:
                authorization: "1:A ring to rule them all"

        stubIsAuthenticated = {}

        before (done) ->
            stubIsAuthenticated = sinon.stub remoteAccess,
                'isAuthenticated', (header, callback) ->
                    callback false

            done()

        after (done) ->
            stubIsAuthenticated.restore()
            done()


