Mercurial > hg > nginx-tests
diff js_internal_redirect.t @ 1345:9fbe84b7ddc6
Tests: style.
author | Dmitry Volyntsev <xeioex@nginx.com> |
---|---|
date | Wed, 13 Jun 2018 15:48:56 +0300 |
parents | 2ff483941037 |
children | 4d5d1e59f45e |
line wrap: on
line diff
--- a/js_internal_redirect.t +++ b/js_internal_redirect.t @@ -48,7 +48,7 @@ http { } location /redirect { - internal; + internal; return 200 redirect$arg_b; } @@ -61,18 +61,18 @@ http { EOF $t->write_file('test.js', <<EOF); - function test_redirect(req, res) { - if (req.variables.arg_dest.startsWith('named')) { - req.internalRedirect('\@named'); + function test_redirect(req) { + if (req.variables.arg_dest.startsWith('named')) { + req.internalRedirect('\@named'); - } else { - if (req.variables.arg_a) { - req.internalRedirect('/redirect?b=' + req.variables.arg_a); + } else { + if (req.variables.arg_a) { + req.internalRedirect('/redirect?b=' + req.variables.arg_a); - } else { - req.internalRedirect('/redirect'); - } - } + } else { + req.internalRedirect('/redirect'); + } + } } EOF