Class: ClientTest
Instance Method Summary
collapse
#assert_array_equal, expect, #run
Instance Method Details
#test_client1 ⇒ Object
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/gems/xmpp4r-0.4/test/tc_client.rb', line 10
def test_client1
=begin
c = Client.new(JID.new('client1@localhost/res'))
assert_nothing_raised("Couldn't connect") {
c.connect
}
assert_nothing_raised("Couldn't authenticate") {
c.auth('pw')
}
=end
end
|
#test_jid_is_jid ⇒ Object
22
23
24
25
26
27
28
29
|
# File 'lib/gems/xmpp4r-0.4/test/tc_client.rb', line 22
def test_jid_is_jid
c1 = Client.new(JID.new('user@host/resource'))
assert_kind_of(JID, c1.jid)
assert_equal('user@host/resource', c1.jid.to_s)
c2 = Client.new('user@host/resource')
assert_kind_of(JID, c2.jid)
assert_equal('user@host/resource', c2.jid.to_s)
end
|