From 39091fca80921bc2f5d7ee716bbff01e8a5c5f76 Mon Sep 17 00:00:00 2001 From: Blake Griffith Date: Wed, 9 Mar 2016 14:38:36 -0600 Subject: [PATCH] Add tests for message.getContact FREEBIE --- test/models/messages_test.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/models/messages_test.js b/test/models/messages_test.js index f68a2692..c95ee906 100644 --- a/test/models/messages_test.js +++ b/test/models/messages_test.js @@ -41,6 +41,18 @@ assert.notEqual(secondUrl, firstUrl); }); + it('gets outgoing contact', function() { + var messages = new Whisper.MessageCollection(); + var message = messages.add(attributes); + message.getContact(); + }); + + it('gets incoming contact', function() { + var messages = new Whisper.MessageCollection(); + var message = messages.add({ type: 'incoming' }); + message.getContact(); + }); + it('adds without saving', function() { var messages = new Whisper.MessageCollection(); var message = messages.add(attributes);