diff --git a/test/tostring.coffee b/test/tostring.coffee index af2d889..8df40a3 100644 --- a/test/tostring.coffee +++ b/test/tostring.coffee @@ -5,33 +5,33 @@ should = require("chai").should() vows.describe("Converting parsed messages to strings").addBatch( "#toString() on parsed message": "with command only": - topic: Message "FOO" + topic: (Message "FOO").toString() "should return 'FOO'": (topic) -> - topic.toString().should.equal "FOO" + topic.should.equal "FOO" "with prefix, command": - topic: Message ":test FOO" + topic: (Message ":test FOO").toString() "should return ':test FOO'": (topic) -> - topic.toString().should.equal ":test FOO" + topic.should.equal ":test FOO" "with prefix, command, middle, trailing parameter": - topic: Message ":test!me@test.ing PRIVMSG #Test :This is a test" + topic: (Message ":test!me@test.ing PRIVMSG #Test :This is a test").toString() "should return ':test!me@test.ing PRIVMSG #Test :This is a test'": (topic) -> - topic.toString().should.equal ":test!me@test.ing PRIVMSG #Test :This is a test" + topic.should.equal ":test!me@test.ing PRIVMSG #Test :This is a test" "with no prefix, command, middle, trailing with spaces": - topic: Message "PRIVMSG #foo :This is a test" + topic: (Message "PRIVMSG #foo :This is a test").toString() "should return 'PRIVMSG #foo :This is a test'": (topic) -> - topic.toString().should.equal "PRIVMSG #foo :This is a test" + topic.should.equal "PRIVMSG #foo :This is a test" "with multiple middle params, prefix": - topic: Message ":test FOO bar baz quux" + topic: (Message ":test FOO bar baz quux").toString() "should return ':test FOO bar baz quux'": (topic) -> - topic.toString().should.equal ":test FOO bar baz quux" + topic.should.equal ":test FOO bar baz quux" "with tags, prefix, command, middle params, trailing params": - topic: Message "@test=super;single :test!me@test.ing FOO bar baz quux :This is a test" + topic: (Message "@test=super;single :test!me@test.ing FOO bar baz quux :This is a test").toString() "should return '@test=super;single :test!me@test.ing FOO bar baz quux :This is a test'": (topic) -> - topic.toString().should.equal "@test=super;single :test!me@test.ing FOO bar baz quux :This is a test" + topic.should.equal "@test=super;single :test!me@test.ing FOO bar baz quux :This is a test" ).export(module) \ No newline at end of file