Browse Source

replace useless test for uppercase with working one

http2
Vsevolod Strukchinsky 9 years ago
parent
commit
99c8ee9f07
  1. 5
      test/post.js
  2. 5
      test/redirects.js

5
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();
});

5
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();

Loading…
Cancel
Save