blob: 443034d09e627c54baf66905befe5adc0092ba5e [file] [log] [blame]
'use strict';
describe('The xos.helper module', function(){
var SetCSRFToken, httpProviderObj;
//beforeEach(module('xos.helpers'));
//
//beforeEach(inject(function($httpProvider){
// httpProviderObj = $httpProvider;
//}));
//
//beforeEach(inject(function(_SetCSRFToken_){
// console.log('inject csrf');
// SetCSRFToken = _SetCSRFToken_;
//}));
beforeEach(function() {
module('xos.helpers', function ($httpProvider) {
//save our interceptor
httpProviderObj = $httpProvider;
});
inject(function (_SetCSRFToken_) {
SetCSRFToken = _SetCSRFToken_;
})
});
it('should exist', () => {
expect(SetCSRFToken).toBeDefined();
});
it('should set SetCSRFToken interceptor', () => {
expect(httpProviderObj).toBeDefined();
expect(httpProviderObj.interceptors).toContain('SetCSRFToken');
});
});