summaryrefslogtreecommitdiff
path: root/spec/irc_spec.cr
diff options
context:
space:
mode:
authorDaniel Worrall <Daniel.Worrall@hotmail.co.uk>2018-06-12 01:20:48 +0100
committerDaniel Worrall <Daniel.Worrall@hotmail.co.uk>2018-06-12 01:20:48 +0100
commit79d6d80f6a346b8b4297f1a67a6b39c6a965daf1 (patch)
treeccb953c9da0a07fcec8ace5a37dab07bc792fc0f /spec/irc_spec.cr
parentcd514c0ee7bdfabde74edf93420cf893556c6c66 (diff)
downloadtwitch-79d6d80f6a346b8b4297f1a67a6b39c6a965daf1.tar.gz
twitch-79d6d80f6a346b8b4297f1a67a6b39c6a965daf1.zip
Add IRC
Diffstat (limited to 'spec/irc_spec.cr')
-rw-r--r--spec/irc_spec.cr11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/irc_spec.cr b/spec/irc_spec.cr
new file mode 100644
index 0000000..0053024
--- /dev/null
+++ b/spec/irc_spec.cr
@@ -0,0 +1,11 @@
+require "./spec_helper"
+
+describe "PING" do
+ it "responds with PONG" do
+ response = String.build do |io|
+ client = Twitch::IRC.new(io, "foo", "bar")
+ client.dispatch FastIRC::Message.new("PING", nil)
+ end
+ response.should eq FastIRC::Message.new("PONG", ["tmi.twitch.tv"]).to_s
+ end
+end