From 351bf6c327d5bd8cccdf48ca63cd9b2e936d9af0 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 18 Dec 2015 13:19:16 +0200 Subject: [PATCH] fix tests --- tests/messaging.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/messaging.js b/tests/messaging.js index a709640430..ae1db0952a 100644 --- a/tests/messaging.js +++ b/tests/messaging.js @@ -27,14 +27,14 @@ describe('Messaging Library', function() { describe('.canMessage()', function() { it('should not error out', function(done) { - Messaging.canMessage(testUids[1], testUids[2], function(err, allowed) { + Messaging.canMessageUser(testUids[1], testUids[2], function(err, allowed) { assert.ifError(err); done(); }); }); it('should allow messages to be sent to an unrestricted user', function(done) { - Messaging.canMessage(testUids[1], testUids[2], function(err, allowed) { + Messaging.canMessageUser(testUids[1], testUids[2], function(err, allowed) { assert.strictEqual(allowed, true, 'should be true, received ' + allowed); done(); }); @@ -42,7 +42,7 @@ describe('Messaging Library', function() { it('should NOT allow messages to be sent to a restricted user', function(done) { User.setSetting(testUids[1], 'restrictChat', '1', function() { - Messaging.canMessage(testUids[2], testUids[1], function(err, allowed) { + Messaging.canMessageUser(testUids[2], testUids[1], function(err, allowed) { assert.strictEqual(allowed, false, 'should be false, received ' + allowed); done(); }); @@ -50,7 +50,7 @@ describe('Messaging Library', function() { }); it('should always allow admins through', function(done) { - Messaging.canMessage(testUids[0], testUids[1], function(err, allowed) { + Messaging.canMessageUser(testUids[0], testUids[1], function(err, allowed) { assert.strictEqual(allowed, true, 'should be true, received ' + allowed); done(); }); @@ -58,7 +58,7 @@ describe('Messaging Library', function() { it('should allow messages to be sent to a restricted user if restricted user follows sender', function(done) { User.follow(testUids[1], testUids[2], function() { - Messaging.canMessage(testUids[2], testUids[1], function(err, allowed) { + Messaging.canMessageUser(testUids[2], testUids[1], function(err, allowed) { assert.strictEqual(allowed, true, 'should be true, received ' + allowed); done(); });