Crirc/spec/controller/command/talk.cr
2017-11-08 15:07:18 +01:00

17 lines
561 B
Crystal

module Crirc::Test::Controller::Command::Talk
include Crirc::Controller::Command::Talk
extend self
def puts(data)
data
end
end
describe Crirc::Controller::Command::Talk do
it "basic test" do
target = Crirc::Protocol::User.new "nyupnyup"
Crirc::Test::Controller::Command::Talk.notice(target, "This is a very important notice").should eq("NOTICE nyupnyup :This is a very important notice")
Crirc::Test::Controller::Command::Talk.privmsg(target, "This is a test message").should eq("PRIVMSG nyupnyup :This is a test message")
end
end