Matteo Scandolo | f083089 | 2015-11-05 11:58:53 +0100 | [diff] [blame] | 1 | 'use strict'; |
Matteo Scandolo | 32f8392 | 2016-02-11 09:35:29 -0800 | [diff] [blame] | 2 | describe('The xos.helper module', function(){ |
Matteo Scandolo | 89b179c | 2016-03-24 11:38:50 -0700 | [diff] [blame] | 3 | var SetCSRFToken, httpProviderObj; |
Matteo Scandolo | f083089 | 2015-11-05 11:58:53 +0100 | [diff] [blame] | 4 | |
| 5 | beforeEach(module('xos.helpers')); |
Matteo Scandolo | 32f8392 | 2016-02-11 09:35:29 -0800 | [diff] [blame] | 6 | |
Matteo Scandolo | 89b179c | 2016-03-24 11:38:50 -0700 | [diff] [blame] | 7 | beforeEach(module(function(_$httpProvider_){ |
| 8 | httpProviderObj = _$httpProvider_; |
Matteo Scandolo | f083089 | 2015-11-05 11:58:53 +0100 | [diff] [blame] | 9 | })); |
| 10 | |
Matteo Scandolo | 89b179c | 2016-03-24 11:38:50 -0700 | [diff] [blame] | 11 | 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 Scandolo | f083089 | 2015-11-05 11:58:53 +0100 | [diff] [blame] | 24 | }); |