2011-06-13 11:23:02 +08:00
|
|
|
require('../helper');
|
|
|
|
|
|
|
|
var app = require(global.settings.app_root + '/app/controllers/app')
|
2011-06-10 00:34:02 +08:00
|
|
|
, assert = require('assert');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
'GET /v1/': function(){
|
|
|
|
assert.response(app, {
|
|
|
|
url: '/v1/',
|
|
|
|
method: 'GET'
|
|
|
|
},{
|
|
|
|
body: '{"error":["You must indicate a sql query"]}',
|
|
|
|
status: 400
|
|
|
|
});
|
2011-06-13 18:31:50 +08:00
|
|
|
}// ,
|
|
|
|
// 'GET /v1/ with SQL parameter': function(){
|
|
|
|
// assert.response(app, {
|
|
|
|
// url: '/v1/?sql=bla',
|
|
|
|
// method: 'GET'
|
|
|
|
// },{
|
|
|
|
// status: 200
|
|
|
|
// });
|
|
|
|
// }
|
2011-06-13 11:23:02 +08:00
|
|
|
};
|