Sha256: c942e1f4f36a93e09646e678f6923569f708224029b836500f1ec527de40c040
Contents?: true
Size: 881 Bytes
Versions: 1
Compression:
Stored size: 881 Bytes
Contents
require File.join(File.dirname(__FILE__), *%w[.. .. spec_helper]) describe 'Blather::Stanza::PubSub' do it 'registers itself' do XMPPNode.class_from_registration(:pubsub, 'http://jabber.org/protocol/pubsub').must_equal Stanza::PubSub end it 'ensures a pubusb node is present on create' do pubsub = Stanza::PubSub.new pubsub.children.detect { |n| n.element_name == 'pubsub' }.wont_be_nil end it 'ensures a pubsub node exists when calling #pubsub' do pubsub = Stanza::PubSub.new pubsub.remove_child :pubsub pubsub.children.detect { |n| n.element_name == 'pubsub' }.must_be_nil pubsub.pubsub.wont_be_nil pubsub.children.detect { |n| n.element_name == 'pubsub' }.wont_be_nil end it 'sets the host if requested' do aff = Stanza::PubSub.new :get, 'pubsub.jabber.local' aff.to.must_equal JID.new('pubsub.jabber.local') end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
blather-0.2.2 | spec/blather/stanza/pubsub_spec.rb |