From 9d6463f1e79f661026c71580eec4b9f573966885 Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Wed, 28 Jul 2010 17:56:43 -0500 Subject: [PATCH] make sure something is returned --- t/Asset/dispatch.t | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/t/Asset/dispatch.t b/t/Asset/dispatch.t index cfccc6e16..9e47b282c 100644 --- a/t/Asset/dispatch.t +++ b/t/Asset/dispatch.t @@ -59,7 +59,7 @@ WebGUI::Test->addToCleanup( $tag ); #---------------------------------------------------------------------------- # Tests -plan tests => 7; # Increment this number for each test you create +plan tests => 9; # Increment this number for each test you create #---------------------------------------------------------------------------- # Test dispatch @@ -81,9 +81,13 @@ is( $td->dispatch, "www_edit", "dispatch handles ?func= query param" ); is( $td->dispatch( '/foo' ), "bar", "overridden dispatch trumps ?func= query param" ); # Test func= can only be run on the exact asset we requested -isnt( $td->dispatch( '/bar' ), "www_edit", "?func= dispatch cancelled because of unhandled fragment" ); +my $output = $td->dispatch( '/bar' ); +ok( $output, "dispatch returned something, maybe not found page?" ); +isnt( $output, "www_edit", "?func= dispatch cancelled because of unhandled fragment" ); $session->request->setup_body( { } ); -isnt( $td->dispatch( '/bar' ), "www_view", "?func= dispatch cancelled because of unhandled fragment" ); +$output = $td->dispatch( '/bar' ); +ok( $output, "dispatch returned something, maybe not found page?" ); +isnt( $output, "www_view", "?func= dispatch cancelled because of unhandled fragment" ); #vim:ft=perl