Permalink
Browse files

preparing a full chat text

  • Loading branch information...
julien51 committed Dec 4, 2011
1 parent 9ab0fd2 commit cf21ef2a80f56ce317535f35140c18bfc530e01d
Showing with 25 additions and 1 deletion.
  1. +25 −1 test/functional/s2s-chat.js
@@ -38,6 +38,7 @@ describe('A small chat accross 2 servers', function(){
});
beforeEach(function(proceed){
+ bernard, bianca = null;
var ready = _.after(fixtures.length, function() {
bernard = new xmpp.Client({
jid: "bernard@bernard.local",
@@ -86,7 +87,6 @@ describe('A small chat accross 2 servers', function(){
bianca.send(new xmpp.Element('message', {to: "bernard@bernard.local"}).c('body').t(biancaSays));
});
- //
it('bianca should get bernard\'s messages', function(done){
var bernardSays = 'Hi Bianca!';
bianca.on('stanza', function(stanza) {
@@ -99,6 +99,30 @@ describe('A small chat accross 2 servers', function(){
});
bernard.send(new xmpp.Element('message', {to: "bianca@bianca.local"}).c('body').t(bernardSays));
});
+
+ //
+ // it('bianca and bernard should chat just fine', function(done){
+ // var bernardSays = 'Ciao Bianca!';
+ // var responses = _.after(10, function() {
+ // // done();
+ // });
+ // bianca.on('stanza', function(stanza) {
+ // if (stanza.is('message') && new xmpp.JID(stanza.attrs.from).bare().toString() == "bernard@bernard.local" ) {
+ // bianca.send(new xmpp.Element('message', {to: "bernard@bernard.local"}).c('body').t(bernardSays));
+ // responses();
+ // }
+ // });
+ //
+ // bernard.on('stanza', function(stanza) {
+ // if (stanza.is('message') && new xmpp.JID(stanza.attrs.from).bare().toString() == "bianca@bianca.local") {
+ // bernard.send(new xmpp.Element('message', {to: "bianca@bianca.local"}).c('body').t(bernardSays));
+ // responses();
+ // }
+ // });
+ //
+ // bernard.send(new xmpp.Element('message', {to: "bianca@bianca.local"}).c('body').t(bernardSays));
+ // });
+ //
});

0 comments on commit cf21ef2

Please sign in to comment.