Fixer pre/post

This commit is contained in:
Wyatt Johnson
2017-01-24 13:10:35 -07:00
parent eeaefd9656
commit cda768d694
17 changed files with 35 additions and 35 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ const CommentsService = require('../../../../services/comments');
const UsersService = require('../../../../services/users');
const SettingsService = require('../../../../services/settings');
const settings = {id: '1', moderation: 'pre', wordlist: {banned: ['bad words'], suspect: ['suspect words']}};
const settings = {id: '1', moderation: 'PRE', wordlist: {banned: ['bad words'], suspect: ['suspect words']}};
describe('/api/v1/comments', () => {
+1 -1
View File
@@ -13,7 +13,7 @@ const Action = require('../../../../models/action');
const UsersService = require('../../../../services/users');
const SettingsService = require('../../../../services/settings');
const settings = {id: '1', moderation: 'pre', wordlist: {banned: ['banned'], suspect: ['suspect']}};
const settings = {id: '1', moderation: 'PRE', wordlist: {banned: ['banned'], suspect: ['suspect']}};
describe('/api/v1/queue', () => {
const comments = [{
+4 -4
View File
@@ -8,7 +8,7 @@ chai.should();
chai.use(require('chai-http'));
const SettingsService = require('../../../../services/settings');
const defaults = {id: '1', moderation: 'pre'};
const defaults = {id: '1', moderation: 'PRE'};
describe('/api/v1/settings', () => {
@@ -25,7 +25,7 @@ describe('/api/v1/settings', () => {
.then((res) => {
expect(res).to.have.status(200);
expect(res).to.be.json;
expect(res.body).to.have.property('moderation', 'pre');
expect(res.body).to.have.property('moderation', 'PRE');
});
});
});
@@ -36,14 +36,14 @@ describe('/api/v1/settings', () => {
return chai.request(app)
.put('/api/v1/settings')
.set(passport.inject({roles: ['ADMIN']}))
.send({moderation: 'post'})
.send({moderation: 'POST'})
.then((res) => {
expect(res).to.have.status(204);
return SettingsService.retrieve();
})
.then((settings) => {
expect(settings).to.have.property('moderation', 'post');
expect(settings).to.have.property('moderation', 'POST');
});
});
});
+1 -1
View File
@@ -6,7 +6,7 @@ const chai = require('chai');
const expect = chai.expect;
const SettingsService = require('../../../../services/settings');
const settings = {id: '1', moderation: 'pre', wordlist: {banned: ['bad words'], suspect: ['suspect words']}};
const settings = {id: '1', moderation: 'PRE', wordlist: {banned: ['bad words'], suspect: ['suspect words']}};
// Setup chai.
chai.should();