From 3c0a6aa22f1fd3f5f77cb90ac32603ab03cc162c Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Tue, 22 Jun 2010 15:25:40 -0400 Subject: [PATCH] add test for logged-in user --- t/Operation/Auth.t | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/t/Operation/Auth.t b/t/Operation/Auth.t index f1105acd3..2c31eded2 100644 --- a/t/Operation/Auth.t +++ b/t/Operation/Auth.t @@ -52,7 +52,7 @@ package main; #---------------------------------------------------------------------------- # Tests -plan tests => 6; # Increment this number for each test you create +plan tests => 7; # Increment this number for each test you create #---------------------------------------------------------------------------- # Test the getInstance method @@ -78,8 +78,17 @@ isa_ok( 'AuthType in config file, so return instance of authType', ); +$session->user({ userId => 3 }); +isa_ok( + WebGUI::Operation::Auth::getInstance( $session ), + 'WebGUI::Auth::WebGUI', + 'AuthType is defined by the logged-in user', +); + +#---------------------------------------------------------------------------- # Test the web method for auth operation # First a clean session, without an authenticated user +$session->user({ userId => 1 }); my $output = WebGUI::Operation::Auth::www_auth($session); like( $output,