add test to check that the fallback api key used if none is sent, is the default public

This commit is contained in:
Eneko Lakasta 2018-05-08 11:32:45 +02:00
parent e1b848afd0
commit 0536d0abcb

View File

@ -126,6 +126,22 @@ describe('Basic authorization use cases', function () {
);
});
it("fail with default - sending no api key token", function (done) {
var layergroup = singleLayergroupConfig(pointSqlMaster, '#layer { marker-fill:red; }');
assert.response(server,
createRequest(layergroup, 'localhost'),
{
status: 403
},
function (res, err) {
assert.ifError(err);
done();
}
);
});
it("fail with non-existent api key", function (done) {
var layergroup = singleLayergroupConfig(pointSqlPublic, '#layer { marker-fill:red; }');