From f2a795a9b7a46fe08f5da45a8a54db07fc2425e3 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Tue, 21 Feb 2017 15:18:01 +0300 Subject: [PATCH] fix tests --- test/user.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/user.js b/test/user.js index a666d2c115..70334d04e1 100644 --- a/test/user.js +++ b/test/user.js @@ -1078,7 +1078,8 @@ describe('User', function () { it('should get user\'s invites', function (done) { User.getInvites(inviterUid, function (err, data) { assert.ifError(err); - assert.deepEqual(data, ['invite1@test.com', 'invite2@test.com']); + assert.notEqual(data.indexOf('invite1@test.com'), -1); + assert.notEqual(data.indexOf('invite2@test.com'), -1); done(); }); }); @@ -1086,7 +1087,9 @@ describe('User', function () { it('should get all invites', function (done) { User.getAllInvites(function (err, data) { assert.ifError(err); - assert.deepEqual(data, [ { uid: inviterUid, invitations: [ 'invite1@test.com', 'invite2@test.com' ] } ]); + assert.equal(data[0].uid, inviterUid); + assert.notEqual(data[0].invitations.indexOf('invite1@test.com'), -1); + assert.notEqual(data[0].invitations.indexOf('invite2@test.com'), -1); done(); }); });