blob: 60e8c63bb46ab2d98cb3b9efefe3a0790b435a18 [file] [log] [blame]
Matteo Scandolof0830892015-11-05 11:58:53 +01001'use strict';
Matteo Scandolo32f83922016-02-11 09:35:29 -08002describe('The xos.helper module', function(){
Matteo Scandolo89b179c2016-03-24 11:38:50 -07003 var SetCSRFToken, httpProviderObj;
Matteo Scandolof0830892015-11-05 11:58:53 +01004
5 beforeEach(module('xos.helpers'));
Matteo Scandolo32f83922016-02-11 09:35:29 -08006
Matteo Scandolo89b179c2016-03-24 11:38:50 -07007 beforeEach(module(function(_$httpProvider_){
8 httpProviderObj = _$httpProvider_;
Matteo Scandolof0830892015-11-05 11:58:53 +01009 }));
10
Matteo Scandolo89b179c2016-03-24 11:38:50 -070011 beforeEach(angular.mock.inject(function(_SetCSRFToken_){
12 SetCSRFToken = _SetCSRFToken_;
13 }));
14
15 it('should exist', () => {
16 expect(SetCSRFToken).toBeDefined();
17 });
18
19 xit('should set SetCSRFToken interceptor', () => {
20 expect(httpProviderObj).toBeDefined();
21 expect(httpProviderObj.interceptors).toContain('SetCSRFToken');
22 });
23
Matteo Scandolof0830892015-11-05 11:58:53 +010024});