UNPKG

kentico-cloud-delivery

Version:

Official Kentico Cloud Delivery SDK

24 lines 849 B
import { Context, setup } from '../../setup'; describe('Live authorization headers', function () { var authorizationHeader = 'authorization'; var context = new Context({ usePreviewMode: true }); 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