提交 548e0af3 编写于 作者: B Bryan Smith

Use absolute URL in redirect test

Avoids an issue where native implementations resolve and expand the URL.
上级 cfa8eda8
......@@ -394,10 +394,10 @@ suite('Response', function() {
})
test('redirect creates redirect Response', function() {
var r = Response.redirect('/hello', 301)
var r = Response.redirect('https://fetch.spec.whatwg.org/', 301)
assert(r instanceof Response);
assert.equal(r.status, 301)
assert.equal(r.headers.get('Location', '/hello'), '/hello')
assert.equal(r.headers.get('Location'), 'https://fetch.spec.whatwg.org/')
})
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册