Mercurial > hg > nginx-tests
diff js_internal_redirect.t @ 1760:3580ad4b575f
Tests: fixed js_internal_redirect.t TODO.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Thu, 26 May 2022 14:49:10 +0400 |
parents | ce8b0c9452ae |
children | 520fb74cce4c |
line wrap: on
line diff
--- a/js_internal_redirect.t +++ b/js_internal_redirect.t @@ -41,6 +41,10 @@ http { listen 127.0.0.1:8080; server_name localhost; + location /njs { + js_content test.njs; + } + location /test { js_content test.redirect; } @@ -59,6 +63,10 @@ http { EOF $t->write_file('test.js', <<EOF); + function test_njs(r) { + r.return(200, njs.version); + } + function redirect(r) { if (r.variables.arg_dest == 'named') { r.internalRedirect('\@named'); @@ -79,7 +87,7 @@ EOF } } - export default {redirect}; + export default {njs:test_njs, redirect}; EOF