/api/ subroutes only available in dev/test
This commit is contained in:
		@@ -43,7 +43,7 @@ export default class TestHelper {
 | 
			
		||||
    db.disconnect(done);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  static request (server, done, options) {  // options in form: {method, url, auth: {key/basic: 'name' or 'key'/{name, pass}}, httpStatus, req, res}
 | 
			
		||||
  static request (server, done, options) {  // options in form: {method, url, auth: {key/basic: 'name' or 'key'/{name, pass}}, httpStatus, req, res, default (set to false if you want to dismiss default .end handling)}
 | 
			
		||||
    let st = supertest(server);
 | 
			
		||||
    if (options.hasOwnProperty('auth') && options.auth.hasOwnProperty('key')) {  // resolve API key
 | 
			
		||||
      options.url += '?key=' + (this.auth.hasOwnProperty(options.auth.key)? this.auth[options.auth.key].key : options.auth.key);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user