almost everything for #2335

This commit is contained in:
Julian Lam
2014-10-31 13:22:42 -04:00
parent 61aaff025b
commit b91d39a0d3
8 changed files with 158 additions and 14 deletions

View File

@@ -23,6 +23,13 @@ describe("Messaging Library", function() {
});
describe(".canMessage()", function() {
it('should not error out', function(done) {
Messaging.canMessage(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) {
assert.strictEqual(allowed, true, 'should be true, received ' + allowed);