Fix roundtrip tests

They were testing `toString` against the message itself (`inspect`)
instead of against the original text.
This commit is contained in:
Trevin Hofmann 2015-02-09 12:00:35 -06:00
parent af680e4f23
commit 84e52ef095
1 changed files with 2 additions and 2 deletions

View File

@ -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);
});
});