|
|
@ -596,9 +596,7 @@ describe('Flags', function () {
|
|
|
|
|
|
|
|
|
|
|
|
describe('(websockets)', function () {
|
|
|
|
describe('(websockets)', function () {
|
|
|
|
var SocketFlags = require('../src/socket.io/flags.js');
|
|
|
|
var SocketFlags = require('../src/socket.io/flags.js');
|
|
|
|
var tid;
|
|
|
|
|
|
|
|
var pid;
|
|
|
|
var pid;
|
|
|
|
var flag;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
before(function (done) {
|
|
|
|
before(function (done) {
|
|
|
|
Topics.post({
|
|
|
|
Topics.post({
|
|
|
@ -607,7 +605,6 @@ describe('Flags', function () {
|
|
|
|
title: 'Another topic',
|
|
|
|
title: 'Another topic',
|
|
|
|
content: 'This is flaggable content',
|
|
|
|
content: 'This is flaggable content',
|
|
|
|
}, function (err, topic) {
|
|
|
|
}, function (err, topic) {
|
|
|
|
tid = topic.postData.tid;
|
|
|
|
|
|
|
|
pid = topic.postData.pid;
|
|
|
|
pid = topic.postData.pid;
|
|
|
|
|
|
|
|
|
|
|
|
done(err);
|
|
|
|
done(err);
|
|
|
@ -620,8 +617,7 @@ describe('Flags', function () {
|
|
|
|
type: 'post',
|
|
|
|
type: 'post',
|
|
|
|
id: pid,
|
|
|
|
id: pid,
|
|
|
|
reason: 'foobar',
|
|
|
|
reason: 'foobar',
|
|
|
|
}, function (err, flagObj) {
|
|
|
|
}, function (err) {
|
|
|
|
flag = flagObj;
|
|
|
|
|
|
|
|
assert.ifError(err);
|
|
|
|
assert.ifError(err);
|
|
|
|
|
|
|
|
|
|
|
|
Flags.exists('post', pid, 1, function (err, exists) {
|
|
|
|
Flags.exists('post', pid, 1, function (err, exists) {
|
|
|
|