[chrome/xsrf] added test for getXsrfToken method

This commit is contained in:
spalger 2015-11-10 10:40:14 -06:00
parent cbfb95a15d
commit d76f4c2149

View file

@ -9,6 +9,14 @@ const xsrfHeader = 'kbn-xsrf-token';
const xsrfToken = 'xsrfToken';
describe('chrome xsrf apis', function () {
describe('#getXsrfToken()', function () {
it('exposes the token', function () {
const chrome = {};
xsrfChromeApi(chrome, { xsrfToken });
expect(chrome.getXsrfToken()).to.be(xsrfToken);
});
});
context('jQuery support', function () {
it('adds a global jQuery prefilter', function () {
stub($, 'ajaxPrefilter');