mirror of
https://github.com/tenrok/axios.git
synced 2026-06-05 16:42:32 +03:00
Fixing failing tests
This commit is contained in:
@@ -30,10 +30,7 @@ describe('wrapper', function () {
|
||||
axios({
|
||||
method: 'post',
|
||||
url: '/foo',
|
||||
data: {
|
||||
firstName: 'foo',
|
||||
lastName: 'bar'
|
||||
}
|
||||
data: 'fizz=buzz'
|
||||
});
|
||||
|
||||
var request = jasmine.Ajax.requests.mostRecent();
|
||||
@@ -45,6 +42,20 @@ describe('wrapper', function () {
|
||||
}
|
||||
});
|
||||
|
||||
it('should use application/json when posting an object', function () {
|
||||
axios({
|
||||
url: '/foo/bar',
|
||||
method: 'post',
|
||||
data: {
|
||||
firstName: 'foo',
|
||||
lastName: 'bar'
|
||||
}
|
||||
});
|
||||
|
||||
var request = jasmine.Ajax.requests.mostRecent();
|
||||
expect(request.requestHeaders['Content-Type']).toEqual('application/json;charset=utf-8');
|
||||
});
|
||||
|
||||
it('should support binary data as array buffer', function () {
|
||||
var input = new Int8Array(2);
|
||||
input[0] = 1;
|
||||
|
||||
Reference in New Issue
Block a user