提交 eb4aec25 编写于 作者: M Mislav Marohnić

Merge pull request #219 from bryanrsmith/redirect-test

Use absolute URL in Response.redirect test
...@@ -394,10 +394,10 @@ suite('Response', function() { ...@@ -394,10 +394,10 @@ suite('Response', function() {
}) })
test('redirect creates redirect 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(r instanceof Response);
assert.equal(r.status, 301) 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.
先完成此消息的编辑!
想要评论请 注册