3 const assert = require('assert');
4 const internalClientAccessOnly = require('../lib/internal-client-access-only');
6 describe('internal-client-access-only', () => {
9 name: 'null is not an internal client',
14 name: 'invalid client is not an internal client',
19 name: 'an arbitrary client is not internal client',
20 client: { clientKey: 'bob', canSkipAuthorization: false },
24 name: 'clients who canSkipAuthorization are internal',
25 client: { clientKey: 'bob', canSkipAuthorization: true },
29 name: 'web-internal is internal',
30 client: { clientKey: 'web-internal' },
35 FIXTURES.forEach(function(meta) {
36 it(meta.name, function() {
37 var result = internalClientAccessOnly.isRequestFromInternalClient({
43 assert.strictEqual(result, meta.result);