Refactor and advancements
- Drops mailController, centralized in UserController - Adds views folder for change_password - Improves PromiseRouter to support text results - Improves PromiseRouter to support empty responses for redirects - Adds options to AdaptableController - UsersController gracefully fails when no adapter is set - Refactors GlobalConfig into same style for Routers
This commit is contained in:
@@ -2,13 +2,12 @@
|
||||
|
||||
var request = require('request');
|
||||
var Parse = require('parse/node').Parse;
|
||||
var DatabaseAdapter = require('../src/DatabaseAdapter');
|
||||
|
||||
let database = DatabaseAdapter.getDatabaseConnection('test', 'test_');
|
||||
let Config = require('../src/Config');
|
||||
|
||||
describe('a GlobalConfig', () => {
|
||||
beforeEach(function(done) {
|
||||
database.rawCollection('_GlobalConfig')
|
||||
let config = new Config('test');
|
||||
config.database.rawCollection('_GlobalConfig')
|
||||
.then(coll => coll.updateOne({ '_id': 1}, { $set: { params: { companies: ['US', 'DK'] } } }, { upsert: true }))
|
||||
.then(done());
|
||||
});
|
||||
@@ -61,7 +60,8 @@ describe('a GlobalConfig', () => {
|
||||
});
|
||||
|
||||
it('failed getting config when it is missing', (done) => {
|
||||
database.rawCollection('_GlobalConfig')
|
||||
let config = new Config('test');
|
||||
config.database.rawCollection('_GlobalConfig')
|
||||
.then(coll => coll.deleteOne({ '_id': 1}, {}, {}))
|
||||
.then(_ => {
|
||||
request.get({
|
||||
|
||||
Reference in New Issue
Block a user