Node.js based forum software built for the modern web
fix: tests
Barış Soner Uşaklıe3c9dafa08c2
diff --git a/test/controllers.js b/test/controllers.jsindex 649f077156..9c14d42b72 100644--- a/test/controllers.js+++ b/test/controllers.js@@ -1300,7 +1300,7 @@ describe('Controllers', function () {assert.equal(notif.bodyShort, notifData.bodyShort);assert.equal(notif.bodyLong, notifData.bodyLong);assert.equal(notif.pid, notifData.pid);- assert.equal(notif.path, notifData.path);+ assert.equal(notif.path, nconf.get('relative_path') + notifData.path);assert.equal(notif.nid, notifData.nid);next();},diff --git a/test/messaging.js b/test/messaging.jsindex 4188e7e50b..c49c6d6ee5 100644--- a/test/messaging.js+++ b/test/messaging.js@@ -382,7 +382,7 @@ describe('Messaging Library', function () {var notification = data.unread[0];assert.equal(notification.bodyShort, '[[notifications:new_message_from, foo]]');assert.equal(notification.nid, 'chat_' + fooUid + '_' + roomId);- assert.equal(notification.path, '/chats/' + roomId);+ assert.equal(notification.path, nconf.get('relative_path') + '/chats/' + roomId);done();});}, 1500);diff --git a/test/notifications.js b/test/notifications.jsindex 73af314fa9..5cca226e02 100644--- a/test/notifications.js+++ b/test/notifications.js@@ -3,6 +3,7 @@var assert = require('assert');var async = require('async');+var nconf = require('nconf');var db = require('./mocks/databasemock');var meta = require('../src/meta');@@ -228,7 +229,6 @@ describe('Notifications', function () {it('should link to the first unread post in a watched topic', function (done) {var categories = require('../src/categories');var topics = require('../src/topics');-var watcherUid;var cid;var tid;@@ -286,7 +286,7 @@ describe('Notifications', function () {},function (notifications, next) {assert.equal(notifications.unread.length, 1, 'there should be 1 unread notification');- assert.equal('/post/' + pid, notifications.unread[0].path, 'the notification should link to the first unread post');+ assert.equal(nconf.get('relative_path') + '/post/' + pid, notifications.unread[0].path, 'the notification should link to the first unread post');next();},], function (err) {@@ -300,7 +300,7 @@ describe('Notifications', function () {assert.ifError(err);assert.equal(data[0].bodyShort, 'bodyShort');assert.equal(data[0].nid, 'notification_id');- assert.equal(data[0].path, '/notification/path');+ assert.equal(data[0].path, nconf.get('relative_path') + '/notification/path');done();});});