From feca747e061e4d48ca397e1399b24cb34541e3f2 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Fri, 3 Nov 2017 21:58:53 +0100 Subject: [PATCH] Fix tests --- app/network/__tests__/network.test.js | 59 ++++++++++++++++++++++----- 1 file changed, 49 insertions(+), 10 deletions(-) diff --git a/app/network/__tests__/network.test.js b/app/network/__tests__/network.test.js index 961d8552d2..6f37fb5125 100644 --- a/app/network/__tests__/network.test.js +++ b/app/network/__tests__/network.test.js @@ -78,7 +78,10 @@ describe('actuallySend()', () => { HTTPHEADER: [ 'Content-Type: application/json', 'Expect: ', - 'Transfer-Encoding: ' + 'Transfer-Encoding: ', + 'Connection: close', + 'Accept: ', + 'Accept-Encoding: ' ], NOPROGRESS: false, USERNAME: 'user', @@ -131,7 +134,10 @@ describe('actuallySend()', () => { HTTPHEADER: [ 'Content-Type: application/x-www-form-urlencoded', 'Expect: ', - 'Transfer-Encoding: ' + 'Transfer-Encoding: ', + 'Connection: close', + 'Accept: ', + 'Accept-Encoding: ' ], NOPROGRESS: false, POSTFIELDS: 'foo=bar&bar=&=value', @@ -209,7 +215,10 @@ describe('actuallySend()', () => { HTTPHEADER: [ 'Content-Type: application/json', 'Expect: ', - 'Transfer-Encoding: ' + 'Transfer-Encoding: ', + 'Connection: close', + 'Accept: ', + 'Accept-Encoding: ' ], NOPROGRESS: false, USERNAME: 'user', @@ -259,7 +268,10 @@ describe('actuallySend()', () => { HTTPHEADER: [ 'Content-Type: application/octet-stream', 'Expect: ', - 'Transfer-Encoding: ' + 'Transfer-Encoding: ', + 'Connection: close', + 'Accept: ', + 'Accept-Encoding: ' ], NOPROGRESS: false, INFILESIZE_LARGE: 26, @@ -316,7 +328,10 @@ describe('actuallySend()', () => { HTTPHEADER: [ 'Content-Type: multipart/form-data; boundary=X-INSOMNIA-BOUNDARY', 'Expect: ', - 'Transfer-Encoding: ' + 'Transfer-Encoding: ', + 'Connection: close', + 'Accept: ', + 'Accept-Encoding: ' ], INFILESIZE_LARGE: 244, NOPROGRESS: false, @@ -364,7 +379,12 @@ describe('actuallySend()', () => { ACCEPT_ENCODING: '', COOKIEFILE: '', FOLLOWLOCATION: true, - HTTPHEADER: ['content-type: '], + HTTPHEADER: [ + 'Connection: close', + 'Accept: ', + 'Accept-Encoding: ', + 'content-type: ' + ], NOPROGRESS: false, PROXY: '', TIMEOUT_MS: 0, @@ -398,7 +418,12 @@ describe('actuallySend()', () => { ACCEPT_ENCODING: '', COOKIEFILE: '', FOLLOWLOCATION: true, - HTTPHEADER: ['content-type: '], + HTTPHEADER: [ + 'Connection: close', + 'Accept: ', + 'Accept-Encoding: ', + 'content-type: ' + ], NOPROGRESS: false, PROXY: '', TIMEOUT_MS: 0, @@ -431,7 +456,12 @@ describe('actuallySend()', () => { ACCEPT_ENCODING: '', COOKIEFILE: '', FOLLOWLOCATION: true, - HTTPHEADER: ['content-type: '], + HTTPHEADER: [ + 'Connection: close', + 'Accept: ', + 'Accept-Encoding: ', + 'content-type: ' + ], NOPROGRESS: false, PROXY: '', TIMEOUT_MS: 0, @@ -465,7 +495,12 @@ describe('actuallySend()', () => { ACCEPT_ENCODING: '', COOKIEFILE: '', FOLLOWLOCATION: true, - HTTPHEADER: ['content-type: '], + HTTPHEADER: [ + 'Connection: close', + 'Accept: ', + 'Accept-Encoding: ', + 'content-type: ' + ], NOPROGRESS: false, PROXY: '', TIMEOUT_MS: 0, @@ -516,7 +551,11 @@ describe('_getAwsAuthHeaders', () => { accessKeyId: 'AKIA99999999', secretAccessKey: 'SAK9999999999999' }, - headers: [], + headers: [ + 'Connection: close', + 'Accept: ', + 'Accept-Encoding: ' + ], url: 'https://example.com', method: 'GET' };