From 985631092b477790a5d0297fe19d3ecdf2f1df26 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Fri, 24 May 2013 13:51:39 +0200 Subject: [PATCH] Fix test for custom base_url --- test/acceptance/app.test.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/acceptance/app.test.js b/test/acceptance/app.test.js index 89785e7e..f8f01e1c 100644 --- a/test/acceptance/app.test.js +++ b/test/acceptance/app.test.js @@ -59,14 +59,12 @@ test('GET /api/v1/sql', function(done){ // Test base_url setting test('GET /api/whatever/sql', function(done){ assert.response(app, { - url: '/api/whatever/sql', + url: '/api/whatever/sql?q=SELECT%201', + headers: {host: 'vizzuality.cartodb.com'}, method: 'GET' },{ - status: 400 }, function(res) { - assert.deepEqual(res.headers['content-type'], 'application/json; charset=utf-8'); - assert.deepEqual(res.headers['content-disposition'], 'inline'); - assert.deepEqual(JSON.parse(res.body), {"error":["You must indicate a sql query"]}); + assert.equal(res.statusCode, 200, res.body); done(); }); });