 
 
         it 'should remove the document from the database', (done) ->
-            sharing.delete req, {}, ->
+            sharing.deleteFromSharer req, {}, ->
                 dbRemoveStub.callCount.should.equal 1
                 done()
 
         it 'should transmit the targets and the shareID to the next callback',
         (done) ->
-            sharing.delete req, {}, ->
+            sharing.deleteFromSharer req, {}, ->
                 should.exist req.share
                 should.exist req.share.targets
                 should.exist req.share.shareID

            notifyTargetStub.restore() # cancel stub
            errNotifyTargetFn = (url, route, notification, callback) ->
                callback "Error"
            notifyTargetStub = sinon.stub Sharing, "notifyRecipient",
                errNotifyTargetFn

            sharing.sendDeleteNotifications req, {}, (err) ->
                should.exist err
                err.should.equal "Error"
                done()

                        done()

            # and finally call the test
            sharing.sendRevocationToTargets req, resStub, ->
                done()

        it 'should return an error when a notification could not be sent',
