From 84e52ef09547744254933e73ec9863b3bb2b0fd9 Mon Sep 17 00:00:00 2001 From: Trevin Hofmann Date: Mon, 9 Feb 2015 12:00:35 -0600 Subject: [PATCH] Fix roundtrip tests They were testing `toString` against the message itself (`inspect`) instead of against the original text. --- test/message.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/message.js b/test/message.js index 9e00cc0..6143b8e 100644 --- a/test/message.js +++ b/test/message.js @@ -109,7 +109,7 @@ describe('Message', function() { it('roundtrip to-from-to', function() { var json = new Message(text).toJSON(); var message = Message.fromJSON(json); - message.toString().should.equal(message); + message.toString().should.equal(text); }); it('checks that the string parameter is valid JSON', function() { @@ -130,7 +130,7 @@ describe('Message', function() { it('roundtrip to-from-to', function() { var str = new Message(text).toString(); var message = Message.fromString(str); - message.toString().should.equal(message); + message.toString().should.equal(text); }); });