2018-10-24 21:42:33 +08:00
|
|
|
'use strict';
|
2018-03-13 18:59:07 +08:00
|
|
|
|
|
|
|
var server = require('../../app/server')();
|
|
|
|
const assert = require('../support/assert');
|
|
|
|
|
|
|
|
describe('Cache', function () {
|
|
|
|
it('should return a Vary header', function (done) {
|
|
|
|
assert.response(server, {
|
|
|
|
url: '/api/v1/sql?api_key=1234&g=select%20*%20from%20untitle_table_4',
|
|
|
|
headers: {
|
|
|
|
host: 'vizzuality.cartodb.com'
|
|
|
|
},
|
|
|
|
method: 'GET'
|
|
|
|
},
|
|
|
|
{},
|
|
|
|
function(err, res) {
|
|
|
|
assert.equal(res.headers.vary, 'Authorization');
|
|
|
|
done();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|