mirror of
https://github.com/tenrok/axios.git
synced 2026-06-08 17:22:34 +03:00
Adding support for params
This commit is contained in:
@@ -88,6 +88,19 @@ describe('axios', function () {
|
||||
expect(request.requestHeaders['X-Requested-With']).toEqual('XMLHttpRequest');
|
||||
});
|
||||
|
||||
it('should accept params', function () {
|
||||
axios({
|
||||
url: '/foo',
|
||||
params: {
|
||||
foo: 123,
|
||||
bar: 456
|
||||
}
|
||||
});
|
||||
|
||||
var request = jasmine.Ajax.requests.mostRecent();
|
||||
expect(request.url).toBe('/foo?foo=123&bar=456');
|
||||
});
|
||||
|
||||
it('should allow overriding default headers', function () {
|
||||
axios({
|
||||
headers: {
|
||||
|
||||
Reference in New Issue
Block a user