Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Nov 22, 2016
1 parent 38bc8ad commit 0794e39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/posts.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,16 +317,17 @@ describe('Post\'s', function () {
});

describe('flagging a post', function () {
var meta = require('../src/meta');
var socketPosts = require('../src/socket.io/posts');
it('should fail to flag a post due to low reputation', function (done) {
meta.config['privileges:flag'] = 10;
flagPost(function (err) {
assert.equal(err.message, '[[error:not-enough-reputation-to-flag]]');
done();
});
});

it('should flag a post', function (done) {
var meta = require('../src/meta');
meta.config['privileges:flag'] = -1;
flagPost(function (err) {
assert.ifError(err);
Expand Down

0 comments on commit 0794e39

Please sign in to comment.