added test that makes sure cgis are actually getting invoked with each request
Robert Buels [Mon, 2 Aug 2010 21:59:38 +0000 (14:59 -0700)]
t/cgibin.t
t/lib/TestCGIBin/root/cgi-bin/time.pl [new file with mode: 0644]

index e1798ec..39f0fd8 100644 (file)
@@ -87,4 +87,10 @@ SKIP: {
     is $response->code, 500, 'Non-Perl CGI with non-zero exit dies';
 }
 
+{ $response = get('/my-bin/time.pl');
+  sleep 1;
+  my $response_2 =  get('/my-bin/time.pl');
+  isnt( $response, $response_2, 'cgis are getting invoked each time' );
+}
+
 done_testing;
diff --git a/t/lib/TestCGIBin/root/cgi-bin/time.pl b/t/lib/TestCGIBin/root/cgi-bin/time.pl
new file mode 100644 (file)
index 0000000..563bb5e
--- /dev/null
@@ -0,0 +1,4 @@
+#!/usr/bin/perl
+use CGI ':standard';
+print header, time;
+