Method: MUCClientTest#test_max_users

Defined in:
lib/vendor/xmpp4r/test/muc/tc_muc_mucclient.rb

#test_max_usersObject



178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# File 'lib/vendor/xmpp4r/test/muc/tc_muc_mucclient.rb', line 178

def test_max_users
  state { |pres|
    assert_kind_of(Presence, pres)
    send("<presence from='[email protected]' to='[email protected]/pda' type='error'>" +
         "<error code='503' type='wait'><service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error>" +
         "</presence>")
  }

  m = MUC::MUCClient.new(@client)
  m.my_jid = '[email protected]/pda'
  assert_raises(ServerError) {
    m.join('[email protected]/thirdwitch')
  }
  assert(!m.active?)

  wait_state
end