Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixing the offline functionnal test

  • Loading branch information...
commit 5703a18f7421dc8554db6583f210c613db08bae8 1 parent eb1cadf
@julien51 julien51 authored
Showing with 10 additions and 3 deletions.
  1. +10 −3 test/functional/offline.js
View
13 test/functional/offline.js
@@ -2,8 +2,9 @@
* This connnects 2 clients to the server and makes sure they converse adequately!
**/
-var sys = require('sys');
var xmpp = require('node-xmpp');
+var server = require('../../lib/server.js');
+
var _ = require('underscore');
var User = require('../../lib/users.js').User;
fixtures = [["romeo@localhost", "romeo"], ["juliet@localhost", "juliet"]]; // Fixtures
@@ -14,8 +15,14 @@ describe('When a user is offline', function(){
var romeoSays = "O blessed, blessed night! I am afeard. \
Being in night, all this is but a dream, \
- Too flattering-sweet to be substantial."
-
+ Too flattering-sweet to be substantial.";
+
+ before(function(proceed) {
+ server.run({port: 5222, domain: 'localhost'}, function() {
+ proceed();
+ });
+ });
+
beforeEach(function(proceed){
var ready = _.after(fixtures.length, function() {
romeo = new xmpp.Client({
Please sign in to comment.
Something went wrong with that request. Please try again.