|
|
|
@ -9,7 +9,19 @@ exports.testInit = function(test) {
|
|
|
|
|
test.expect(1);
|
|
|
|
|
var b = new BasicClient(conf.b, function() {
|
|
|
|
|
sys.debug('just connected');
|
|
|
|
|
test.ok('true', 'connected');
|
|
|
|
|
test.ok(true, 'connected');
|
|
|
|
|
test.done();
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
exports.testIq = function(test) {
|
|
|
|
|
test.expect(1);
|
|
|
|
|
new BasicClient(conf.b, function() {
|
|
|
|
|
this.iq(null, new xmpp.Element('query', {xmlns: 'jabber:iq:roster'}), function(iq) {
|
|
|
|
|
var roster = iq.getChild('query', 'jabber:iq:roster').getChildren('item');
|
|
|
|
|
sys.debug(roster);
|
|
|
|
|
test.notEqual(null, roster, 'roster');
|
|
|
|
|
test.done();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
};
|