diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/irc_spec.cr | 11 |
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 |