From 9e64b03f17b4ff54fcc34e2319e6588cf6ae9984 Mon Sep 17 00:00:00 2001 From: Vsevolod Strukchinsky Date: Sun, 26 Apr 2015 20:46:50 +0500 Subject: [PATCH] add test on host+port in options --- test/test-redirects.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/test-redirects.js b/test/test-redirects.js index f650d77..829ffee 100644 --- a/test/test-redirects.js +++ b/test/test-redirects.js @@ -59,6 +59,14 @@ tape('throws on endless redirect', function (t) { }); }); +tape('host+path in options are not breaking redirects', function (t) { + got(s.url + '/relative', {host: s.url, path: '/relative'}, function (err, data) { + t.error(err); + t.equal(data, 'reached'); + t.end(); + }); +}); + tape('cleanup', function (t) { s.close(); t.end();