Skip to content

Commit 89d7497

Browse files
author
Sandro Santilli
committed
Give more info on unexpected response status code
1 parent 6a2e0a3 commit 89d7497

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/acceptance/app.auth.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ tests['valid api key should allow insert in protected tables'] = function(){
1212

1313
headers: {host: 'vizzuality.localhost.lan:8080' },
1414
method: 'GET'
15-
},{
16-
status: 200
17-
});
15+
},{}, function(res) {
16+
assert.equal(res.statusCode, 200, res.body);
17+
} );
1818
}
1919

2020
tests['invalid api key should NOT allow insert in protected tables'] = function(){
2121
assert.response(app, {
2222
// view prepare_db.sh to see where to set api_key
23-
url: "/api/v1/sql?api_key=RAMBO&q=INSERT%20INTO%20private_table%20(name)%20VALUES%20('test')",
23+
url: "/api/v1/sql?api_key=RAMBO&q=INSERT%20INTO%20private_table%20(name)%20VALUES%20('RAMBO')",
2424

2525
headers: {host: 'vizzuality.cartodb.com' },
2626
method: 'GET'

0 commit comments

Comments
 (0)