summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul Schoenfelder <paulschoenfelder@gmail.com>2016-11-05 15:54:14 -0500
committerPaul Schoenfelder <paulschoenfelder@gmail.com>2016-11-05 15:54:14 -0500
commit7792cccc20bc5cbeb26cf48e69ead5a576b3d72a (patch)
tree6ac48d4f2ac4a70d555597feb4ac2aa55cbb3406 /test
parentUpdate deps (diff)
Add test for JOIN notification. See #56
Diffstat (limited to 'test')
-rw-r--r--test/utils_test.exs9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/utils_test.exs b/test/utils_test.exs
index c7fb6c5..9b669c7 100644
--- a/test/utils_test.exs
+++ b/test/utils_test.exs
@@ -54,6 +54,15 @@ defmodule ExIrc.UtilsTest do
} = Utils.isup(parsed.args, state)
end
+ test "parse join message" do
+ message = ':pschoenf JOIN #elixir-lang'
+ assert %IrcMessage{
+ :nick => "pschoenf",
+ :cmd => "JOIN",
+ :args => ["#elixir-lang"]
+ } = Utils.parse(message)
+ end
+
test "Parse Slack's inappropriate RPL_TOPIC message as if it were an RPL_NOTOPIC" do
# NOTE: This is not a valid message per the RFC. If there's no topic
# (which is the case for Slack in this instance), they should instead send