Sha256: 8d6451a592d92b54e40e60f4e6ab4889d935c8bbe112afcbfac8ebb43f32075d

Contents?: true

Size: 763 Bytes

Versions: 30

Compression:

Stored size: 763 Bytes

Contents

#!/usr/bin/ruby

$:.unshift '../lib'

require 'test/unit'
require 'xmpp4r/rexmladdons'
require 'xmpp4r/query'
include Jabber

class IqQueryTest < Test::Unit::TestCase
  def test_create
    x = IqQuery.new()
    assert_equal("query", x.name)
    assert_equal("<query/>", x.to_s)
  end

  def test_import
    q = IqQuery.new
    assert_equal(IqQuery, q.class)

    e = REXML::Element.new('query')
    e.add_namespace('jabber:iq:roster')
    # kind_of? only checks that the class belongs to the IqQuery class
    # hierarchy. See IqQueryRosterTest#test_import for a more strict
    # check.
    assert_kind_of(IqQuery, IqQuery.import(e))

    # Importing specific derivates is to be tested in the test case of the derivate
    # (e.g. tc_iqqueryroster.rb)
  end
end

Version data entries

30 entries across 30 versions & 12 rubygems

Version Path
brontes3d-xmpp4r-0.4 test/tc_iqquery.rb
bryanl-xmpp4r-0.3.2 test/tc_iqquery.rb
edavey-xmpp4r-0.4.1 test/tc_iqquery.rb
edavey-xmpp4r-0.4.2 test/tc_iqquery.rb
edavey-xmpp4r-0.4 test/tc_iqquery.rb
heipei-xmpp4r-0.3.2 test/tc_iqquery.rb
ln-xmpp4r-0.5 test/tc_iqquery.rb
mojodna-xmpp4r-0.4.0.2 test/tc_iqquery.rb
mojodna-xmpp4r-0.4.0.3 test/tc_iqquery.rb
seanohalpin-xmpp4r-0.4.1 test/tc_iqquery.rb
xmpp4r-0.5.6 test/tc_iqquery.rb
xmpp4r-0.5.5 test/tc_iqquery.rb
mad-p-xmpp4r-0.6.3 test/tc_iqquery.rb
mad-p-xmpp4r-0.6.2 test/tc_iqquery.rb
mad-p-xmpp4r-0.6.1 test/tc_iqquery.rb
mad-p-xmpp4r-0.6.0 test/tc_iqquery.rb
cerberus-0.8.0 lib/vendor/xmpp4r/test/tc_iqquery.rb
cerberus-0.7.9 lib/vendor/xmpp4r/test/tc_iqquery.rb
edavis10-cerberus-0.7.8 lib/vendor/xmpp4r/test/tc_iqquery.rb
cerberus-0.7.8 lib/vendor/xmpp4r/test/tc_iqquery.rb