Sha256: ad9871c6d59d0d2afcdf45ebf222859279aab68c9427cae2f814de07cd9a5bc6
Contents?: true
Size: 966 Bytes
Versions: 9
Compression:
Stored size: 966 Bytes
Contents
require 'helper' include Safubot::XMPP describe Safubot::XMPP do before(:all) do Safubot::Test.clean_environment @raw_message = fixture('xmpp/message') end it 'should store a Blather message' do message = Message.from(@raw_message) message.reload message.xml.should == @raw_message.to_xml message.to.should == @raw_message.to.to_s message.from.should == @raw_message.from.to_s message.text.should == @raw_message.body.strip end it 'should not store duplicate Blather messages' do Message.from(@raw_message).should == Message.from(@raw_message) end it 'should make a request from a Blather message' do message = Message.from(@raw_message) req = message.make_request req.source.should == message req.text.should == message.text req.user.should == message.user end it 'should not make duplicate requests from a Blather message' do message = Message.from(@raw_message) message.make_request.should == message.make_request end end
Version data entries
9 entries across 9 versions & 1 rubygems