summaryrefslogtreecommitdiff
path: root/spec/irc_spec.cr
blob: 0053024b10251d58e0d28a5456951df7498adb13 (plain)
1
2
3
4
5
6
7
8
9
10
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