Skip to content
Permalink
Browse files

fix(test): fixed

  • Loading branch information...
polonel committed Jan 30, 2019
1 parent 080eb35 commit e419f8142a3484730b7d81c5fe619e7b79b45695
Showing with 12 additions and 3 deletions.
  1. +1 −1 app.js
  2. +7 −1 src/controllers/tickets.js
  3. +4 −1 test/0_database.js
2 app.js
@@ -173,7 +173,7 @@ function dbCallback (err, db) {
return next()
},
function (next) {
//Start Check Mail
// Start Check Mail
var settingSchema = require('./src/models/setting')
settingSchema.getSetting('mailer:check:enable', function (err, mailCheckEnabled) {
if (err) {
@@ -91,7 +91,13 @@ ticketsController.getByStatus = function (req, res, next) {
status: []
}

var pathname = url.URL(req.url).pathname
var fullUrl = url.format({
protocol: req.protocol,
host: req.get('host'),
pathname: req.originalUrl
})

var pathname = new url.URL(fullUrl).pathname
var arr = pathname.split('/')
var tType = 'new'
var s = 0
@@ -1,5 +1,5 @@
/* eslint-disable no-unused-expressions */
/* globals server */
/* globals server socketServer */
var expect = require('chai').expect
var winston = require('winston')
var async = require('async')
@@ -136,6 +136,8 @@ before(function (done) {
expect(err).to.not.exist
global.server = ws.server

require('../src/socketserver')(ws)

cb()
},
3111
@@ -154,6 +156,7 @@ after(function (done) {
this.timeout(5000)
mongoose.connection.dropDatabase(function () {
mongoose.connection.close(function () {
socketServer.eventLoop.stop()
server.close()

done()

0 comments on commit e419f81

Please sign in to comment.
You can’t perform that action at this time.