UNPKG

kentico-cloud-delivery

Version:

Official Kentico Cloud Delivery SDK

26 lines 900 B
"use strict"; exports.__esModule = true; var setup_1 = require("../../setup"); describe('Live authorization headers', function () { var authorizationHeader = 'authorization'; var context = new setup_1.Context({ usePreviewMode: true }); setup_1.setup(context); var movieCodename = 'warrior'; var response; beforeAll(function (done) { context.deliveryClient.item(movieCodename) .getObservable() .subscribe(function (r) { response = r; done(); }); }); it("Verifies authorization header is actually present in sent request", function () { var debugResponse = response.debug.response; var header = debugResponse.config.headers[authorizationHeader]; expect(header).toBeTruthy(); }); }); //# sourceMappingURL=live-authorization-header.spec.js.map