             notifyTargetStub.restore() # cancel stub
             errNotifyTargetFn = (url, route, notification, callback) ->
                 callback "Error"
-            notifyTargetStub = sinon.stub Sharing, "notifyRecipient",
+            notifyTargetStub = sinon.stub Sharing, "sendRevocation",
                 errNotifyTargetFn
 
-            sharing.sendDeleteNotifications req, {}, (err) ->
+            sharing.sendRevocationToTargets req, {}, (err) ->
                 should.exist err
                 err.should.equal "Error"
                 done()

        it 'should return an error when the document does not exist in the db',
        (done) ->
            dbGetStub.restore() # we want the correct behavior, not the stub
            client.del "services/sharing/103", (err, res, body) ->
                res.statusCode.should.equal 404
                # Funny thing: the message CouchDB sends us to inform us about
                # an error is "stringified" twice hence the following check.



        it 'should remove the document from the database', (done) ->
            sharing.deleteFromSharer req, {}, ->
                dbRemoveStub.callCount.should.equal 1
                done()

        it 'should transmit the targets and the shareID to the next callback',
        (done) ->
            sharing.deleteFromSharer req, {}, ->
                should.exist req.share
                should.exist req.share.targets
                should.exist req.share.shareID
