Mercurial > hg > nginx-tests
changeset 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 | 8f13779e2cde |
children | c0dfbedf52bd |
files | js_internal_redirect.t |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/js_internal_redirect.t Tue May 24 15:28:21 2022 +0400 +++ b/js_internal_redirect.t Thu May 26 14:49:10 2022 +0400 @@ -41,6 +41,10 @@ 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 @@ 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 @@ } } - export default {redirect}; + export default {njs:test_njs, redirect}; EOF