From 0017886d6e3de17d67d72273df2403bc6655625b Mon Sep 17 00:00:00 2001 From: Liran Tal Date: Mon, 5 Oct 2015 10:13:48 +0300 Subject: [PATCH] updating travis to support installing a local mail server --- config/env/test.js | 9 ++++----- modules/users/tests/server/user.server.routes.tests.js | 8 ++++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/config/env/test.js b/config/env/test.js index c6d24db171..2efb791e64 100644 --- a/config/env/test.js +++ b/config/env/test.js @@ -50,11 +50,10 @@ module.exports = { mailer: { from: process.env.MAILER_FROM || 'MAILER_FROM', options: { - // The TLS configuration option is required for the test environment due - // to testing the e-mail functionality which requires that on an - // uncongifured email setup it is ok to work with unauthorized servers - tls: { - rejectUnauthorized: false + service: process.env.MAILER_SERVICE_PROVIDER || 'MAILER_SERVICE_PROVIDER', + auth: { + user: process.env.MAILER_EMAIL_ID || 'MAILER_EMAIL_ID', + pass: process.env.MAILER_PASSWORD || 'MAILER_PASSWORD' } } }, diff --git a/modules/users/tests/server/user.server.routes.tests.js b/modules/users/tests/server/user.server.routes.tests.js index 6a30bb93f8..492d703ae0 100644 --- a/modules/users/tests/server/user.server.routes.tests.js +++ b/modules/users/tests/server/user.server.routes.tests.js @@ -351,7 +351,7 @@ describe('User CRUD tests', function () { .send({ username: user.username }) - .expect(200) + .expect(400) .end(function (err, res) { // Handle error if (err) { @@ -361,7 +361,7 @@ describe('User CRUD tests', function () { User.findOne({username: user.username.toLowerCase()}, function(err, userRes) { userRes.resetPasswordToken.should.not.be.empty(); should.exist(userRes.resetPasswordExpires); - res.body.message.should.be.equal('An email has been sent to the provided email with further instructions.'); + res.body.message.should.be.equal('Failure sending email'); return done(); }); }); @@ -377,7 +377,7 @@ describe('User CRUD tests', function () { .send({ username: user.username }) - .expect(200) + .expect(400) .end(function (err, res) { // Handle error if (err) { @@ -414,7 +414,7 @@ describe('User CRUD tests', function () { .send({ username: user.username }) - .expect(200) + .expect(400) .end(function (err, res) { // Handle error if (err) {