test for copyto without sql
This commit is contained in:
parent
e347985465
commit
30cb88c3f9
@ -125,6 +125,25 @@ describe('copy-endpoints', function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should fail with copyto endpoint and without sql', function(done){
|
||||||
|
assert.response(server, {
|
||||||
|
url: "/api/v1/sql/copyto?" + querystring.stringify({
|
||||||
|
filename: '/tmp/output.dmp'
|
||||||
|
}),
|
||||||
|
headers: {host: 'vizzuality.cartodb.com'},
|
||||||
|
method: 'GET'
|
||||||
|
},{}, function(err, res) {
|
||||||
|
assert.ifError(err);
|
||||||
|
assert.deepEqual(
|
||||||
|
JSON.parse(res.body),
|
||||||
|
{
|
||||||
|
error:["SQL is missing"]
|
||||||
|
}
|
||||||
|
);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
it('should work with copyfrom and gzip', function(done){
|
it('should work with copyfrom and gzip', function(done){
|
||||||
assert.response(server, {
|
assert.response(server, {
|
||||||
url: "/api/v1/sql/copyfrom?" + querystring.stringify({
|
url: "/api/v1/sql/copyfrom?" + querystring.stringify({
|
||||||
|
Loading…
Reference in New Issue
Block a user