diff options
Diffstat (limited to 'test/ng/httpSpec.js')
| -rw-r--r-- | test/ng/httpSpec.js | 16 | 
1 files changed, 16 insertions, 0 deletions
| diff --git a/test/ng/httpSpec.js b/test/ng/httpSpec.js index 24ff50b4..9c01db65 100644 --- a/test/ng/httpSpec.js +++ b/test/ng/httpSpec.js @@ -940,6 +940,22 @@ describe('$http', function() {          $httpBackend.flush();        });      }); + + +    describe('defaults', function() { + +      it('should expose the defaults object at runtime', function() { +        expect($http.defaults).toBeDefined(); + +        $http.defaults.headers.common.foo = 'bar'; +        $httpBackend.expect('GET', '/url', undefined, function(headers) { +          return headers['foo'] == 'bar'; +        }).respond(''); + +        $http.get('/url'); +        $httpBackend.flush(); +      }); +    });    }); | 
