Tests: fixed js_internal_redirect.t TODO.
diff --git a/js_internal_redirect.t b/js_internal_redirect.t
index cae34ef..7b978e3 100644
--- a/js_internal_redirect.t
+++ b/js_internal_redirect.t
@@ -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