diff --git a/ghost/extract-api-key/test/extract-api-key.test.js b/ghost/extract-api-key/test/extract-api-key.test.js index 7c2d866bf6..41ab6c391d 100644 --- a/ghost/extract-api-key/test/extract-api-key.test.js +++ b/ghost/extract-api-key/test/extract-api-key.test.js @@ -2,6 +2,17 @@ const assert = require('assert'); const extractApiKey = require('../index'); describe('Extract API Key', function () { + it('returns nulls for a request without any key', function () { + const {key, type} = extractApiKey({ + query: { + filter: 'status:active' + } + }); + + assert.equal(key, null); + assert.equal(type, null); + }); + it('Extracts Content API key from the request', function () { const {key, type} = extractApiKey({ query: {