Skip to content

Commit

Permalink
Reenable spamicity-test-as-root
Browse files Browse the repository at this point in the history
Ref #1226
  • Loading branch information
strugee committed Sep 28, 2017
1 parent 6ce883a commit 38a9d26
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions test/spamicity-test-as-root.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
var fs = require("fs"),
path = require("path"),
assert = require("assert"),
http = require("http"),
express = require("express"),
bodyParser = require("body-parser"),
vows = require("vows"),
Step = require("step"),
httputil = require("./lib/http"),
Expand All @@ -38,8 +40,13 @@ var tc = JSON.parse(fs.readFileSync(path.join(__dirname, "config.json")));
suite.addBatch({
"When we set up an activity spam dummy server": {
topic: function() {
var app = express.createServer(express.bodyParser()),
var app = express(),
appServer = http.createServer(app),
callback = this.callback;

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: true}));

app.post("/is-this-spam", function(req, res, next) {
if (app.callback) {
app.callback(null, req.body);
Expand Down Expand Up @@ -263,6 +270,4 @@ suite.addBatch({
}
});

module.exports = {}; // TODO reenable this test when it's passing

// suite["export"](module);
suite["export"](module);

0 comments on commit 38a9d26

Please sign in to comment.