diff --git a/test/post.js b/test/post.js index 16412c6..d2cd97a 100644 --- a/test/post.js +++ b/test/post.js @@ -109,11 +109,6 @@ test('content-type header is not overriden when object in options.body', async t t.is(body['content-type'], 'doge'); }); -test('transforms method to uppercase', async t => { - const headers = (await got(s.url, {method: 'get'})).headers; - t.is(headers.method, 'GET'); -}); - test.after('cleanup', async () => { await s.close(); }); diff --git a/test/redirects.js b/test/redirects.js index edaacb8..ac7c30e 100644 --- a/test/redirects.js +++ b/test/redirects.js @@ -126,6 +126,11 @@ test('redirects from http to https works', async t => { t.ok((await got(`${http.url}/httpToHttps`, {rejectUnauthorized: false})).body); }); +test('redirects works with lowercase method', async t => { + const body = (await got(`${s.url}/relative`, {method: 'head'})).body; + t.is(body, ''); +}); + test.after('cleanup', async () => { await http.close(); await https.close();