Class: PubSub::NodeConfigTest
- Inherits:
-
Test::Unit::TestCase
- Object
- Test::Unit::TestCase
- PubSub::NodeConfigTest
- Includes:
- ClientTester
- Defined in:
- lib/vendor/xmpp4r/test/pubsub/tc_nodeconfig.rb
Overview
Jabber.debug = true
Instance Method Summary collapse
- #test_create ⇒ Object
- #test_create_with_options ⇒ Object
- #test_create_with_options_and_node ⇒ Object
- #test_set_options ⇒ Object
Instance Method Details
#test_create ⇒ Object
18 19 20 21 22 23 |
# File 'lib/vendor/xmpp4r/test/pubsub/tc_nodeconfig.rb', line 18 def test_create() config = PubSub::NodeConfig.new() assert_nil(config.form) assert_nil(config.node) assert_equal({}, config.) end |
#test_create_with_options ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/vendor/xmpp4r/test/pubsub/tc_nodeconfig.rb', line 25 def = {'pubsub#access_model'=>'open'} config = PubSub::NodeConfig.new(nil, ) assert_kind_of(Jabber::Dataforms::XData, config.form) assert_equal(, config.) assert_equal(:submit, config.form.type) assert_equal('http://jabber.org/protocol/pubsub#node_config', config.form.field('FORM_TYPE').values.first) end |
#test_create_with_options_and_node ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/vendor/xmpp4r/test/pubsub/tc_nodeconfig.rb', line 35 def node = 'mynode' = {'pubsub#access_model'=>'open'} config = PubSub::NodeConfig.new(node, ) assert_equal(node, config.node) assert_kind_of(Jabber::Dataforms::XData, config.form) assert_equal(, config.) assert_equal(:submit, config.form.type) assert_equal('http://jabber.org/protocol/pubsub#node_config', config.form.field('FORM_TYPE').values.first) end |