Permalink
Browse files

added passing tests for location if blocks.

  • Loading branch information...
1 parent 1d162c9 commit 539678adf78988c1ddb3f620be3e28fee68cac34 @agentzh agentzh committed Aug 29, 2012
Showing with 30 additions and 0 deletions.
  1. +30 −0 t/if.t
View
30 t/if.t
@@ -0,0 +1,30 @@
+# vi:filetype=
+
+use lib 'lib';
+use Test::Nginx::Socket;
+
+plan tests => repeat_each() * (3 * blocks());
+
+$ENV{TEST_NGINX_MEMCACHED_PORT} ||= 11211;
+
+#no_diff;
+
+run_tests();
+
+__DATA__
+
+=== TEST 1: bad cmd
+--- config
+ location /foo {
+ if ($uri ~* 'foo') {
+ set $memc_cmd flush_all;
+ }
+ memc_pass 127.0.0.1:$TEST_NGINX_MEMCACHED_PORT;
+ }
+--- request
+ GET /foo
+--- response_body eval
+"OK\r\n"
+--- no_error_log
+[error]
+

0 comments on commit 539678a

Please sign in to comment.