2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-14 18:42:33 +03:00

Convert the method parameter to lowercase

This commit is contained in:
杨春旭
2017-05-31 22:53:11 +08:00
parent d1278dfe35
commit e4e32120ce
2 changed files with 17 additions and 0 deletions
+16
View File
@@ -17,6 +17,22 @@ describe('requests', function () {
});
});
it('should treat method value as lowercase string', function (done) {
axios({
url: '/foo',
method: 'POST'
}).then(function (response) {
expect(response.config.method).toBe('post');
done();
});
getAjaxRequest().then(function (request) {
request.respondWith({
status: 200
});
});
});
it('should allow string arg as url, and config arg', function (done) {
axios.post('/foo');