From 0536d0abcb461c37300ec89d42e269bbfb8f979e Mon Sep 17 00:00:00 2001 From: Eneko Lakasta Date: Tue, 8 May 2018 11:32:45 +0200 Subject: [PATCH] add test to check that the fallback api key used if none is sent, is the default public --- .../auth/authorization-basic-use-cases.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/acceptance/auth/authorization-basic-use-cases.js b/test/acceptance/auth/authorization-basic-use-cases.js index 03d20fe3..bfd300fc 100644 --- a/test/acceptance/auth/authorization-basic-use-cases.js +++ b/test/acceptance/auth/authorization-basic-use-cases.js @@ -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; }');