[Jifty-commit] r705 - in jifty/trunk: t/TestApp/lib/TestApp t/TestApp/t t/TestApp/web/templates/dispatch

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Sun Mar 19 18:28:18 EST 2006


Author: alexmv
Date: Sun Mar 19 18:28:17 2006
New Revision: 705

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/t/TestApp/lib/TestApp/Dispatcher.pm
   jifty/trunk/t/TestApp/t/02-dispatch.t
   jifty/trunk/t/TestApp/web/templates/dispatch/basic
   jifty/trunk/t/TestApp/web/templates/dispatch/basic-show

Log:
 r11674 at zoq-fot-pik:  chmrr | 2006-03-19 18:27:15 -0500
  * Add (currently failing) dispatcher tests for before and after


Modified: jifty/trunk/t/TestApp/lib/TestApp/Dispatcher.pm
==============================================================================
--- jifty/trunk/t/TestApp/lib/TestApp/Dispatcher.pm	(original)
+++ jifty/trunk/t/TestApp/lib/TestApp/Dispatcher.pm	Sun Mar 19 18:28:17 2006
@@ -11,6 +11,8 @@
 
 
 my $count = 0;
+my $before = 0;
+my $after = 0;
 
 on '/dispatch/basic' => run {
     set count => $count++;
@@ -21,4 +23,13 @@
     show '/dispatch/basic-show';
 };
 
+before '/dispatch/*' => run {
+    set before => $before++;
+    set after => $after;
+};
+
+after '/dispatch/*' => run {
+    $after++;
+};
+
 1;

Modified: jifty/trunk/t/TestApp/t/02-dispatch.t
==============================================================================
--- jifty/trunk/t/TestApp/t/02-dispatch.t	(original)
+++ jifty/trunk/t/TestApp/t/02-dispatch.t	Sun Mar 19 18:28:17 2006
@@ -17,20 +17,28 @@
 $mech->get_ok("$URL/dispatch/basic", "Got /dispatch/basic");
 $mech->content_contains("Basic test.");
 $mech->content_contains("Count 0");
+$mech->content_contains("before 0");
+$mech->content_contains("after 0");
 
 $mech->get_ok("$URL/dispatch/basic-show", "Got /dispatch/basic-show");
 $mech->content_contains("Basic test with forced show.");
 $mech->content_contains("Count 1");
+$mech->content_contains("before 1");
+$mech->content_contains("after 1");
 
 $mech->get_ok("$URL/dispatch/show/", "Got /dispatch/show");
 $mech->content_contains("Basic test with forced show.");
 $mech->content_contains("Count 2");
 $mech->content_lacks("Count 3");
+$mech->content_contains("before 3");
+$mech->content_contains("after 2");
 
 $mech->get_ok("$URL/dispatch/", "Got /dispatch/");
 $mech->content_contains("Basic test.");
 $mech->content_contains("Count 3");
 $mech->content_lacks("Count 4");
+$mech->content_contains("before 4");
+$mech->content_contains("after 3");
 
 
 

Modified: jifty/trunk/t/TestApp/web/templates/dispatch/basic
==============================================================================
--- jifty/trunk/t/TestApp/web/templates/dispatch/basic	(original)
+++ jifty/trunk/t/TestApp/web/templates/dispatch/basic	Sun Mar 19 18:28:17 2006
@@ -1,3 +1,3 @@
 <&| /_elements/wrapper, title => "Test of dispatch" &>
-  Basic test.  (Count <% $ARGS{count} %>)
+  Basic test.  (Count <% $ARGS{count} %>, before <% $ARGS{before} %>, after <% $ARGS{after} %>)
 </&>

Modified: jifty/trunk/t/TestApp/web/templates/dispatch/basic-show
==============================================================================
--- jifty/trunk/t/TestApp/web/templates/dispatch/basic-show	(original)
+++ jifty/trunk/t/TestApp/web/templates/dispatch/basic-show	Sun Mar 19 18:28:17 2006
@@ -1,3 +1,3 @@
 <&| /_elements/wrapper, title => "Test of dispatch" &>
-  Basic test with forced show.  (Count <% $ARGS{count} %>)
+  Basic test with forced show.  (Count <% $ARGS{count} %>, before <% $ARGS{before} %>, after <% $ARGS{after} %>)
 </&>


More information about the Jifty-commit mailing list