"use strict";

var _httpHeaders = require("../httpHeaders");

describe('httpHeaders', function () {
  describe('jsonHeaders', function () {
    it('returns headers for json', function () {
      expect(_httpHeaders.jsonHeaders).to.deep.equal({
        Accept: 'application/json',
        'Content-Type': 'application/json'
      });
    });
  });
  describe('jwtHeader', function () {
    it('returns header with Signed Authorization token if authorizationMode is not specified', function () {
      var token = '123';
      expect((0, _httpHeaders.jwtHeader)(token)).to.deep.equal({
        Authorization: token,
        AuthType: 'Signature'
      });
    });
  });
  describe('httpHeaders', function () {
    it('return jwtHeader with jsonHeader merged', function () {
      var token = '123';
      expect((0, _httpHeaders.httpHeaders)(token)).to.deep.equal(Object.assign({}, _httpHeaders.jsonHeaders, (0, _httpHeaders.jwtHeader)(token)));
    });
  });
});