[Jifty-commit] r4018 - in jifty/trunk: t/TestApp/t

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Fri Aug 31 14:51:05 EDT 2007


Author: sartak
Date: Fri Aug 31 14:51:04 2007
New Revision: 4018

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/t/TestApp/t/11-current_user.t

Log:
 r40422 at onn:  sartak | 2007-08-31 14:50:15 -0400
 Add (grr, passing) tests for setting columns in the test app


Modified: jifty/trunk/t/TestApp/t/11-current_user.t
==============================================================================
--- jifty/trunk/t/TestApp/t/11-current_user.t	(original)
+++ jifty/trunk/t/TestApp/t/11-current_user.t	Fri Aug 31 14:51:04 2007
@@ -11,7 +11,7 @@
 use lib 't/lib';
 use Jifty::SubTest;
 
-use Jifty::Test tests => 19;
+use Jifty::Test tests => 23;
 use Jifty::Test::WWW::Mechanize;
 
 use_ok('TestApp::Model::User');
@@ -35,6 +35,10 @@
 ok($o->id, "New user has valid id set");
 ok($o->tasty, "User is tasty");
 
+is($o->email, 'bob at example.com', 'email initially set correctly');
+$o->set_email('bob+jifty at example.com');
+is($o->email, 'bob+jifty at example.com', 'email updated correctly');
+
 # Create a CurrentUser
 my $bob = TestApp::CurrentUser->new( name => 'Bob' );
 ok($bob->id, "CurrentUser has a valid id set");
@@ -42,6 +46,10 @@
 ok($bob->user_object->tasty, "The CurrentUser is tasty");
 ok($bob->is_superuser, "CurrentUser is a superuser");
 
+is($bob->user_object->email, 'bob+jifty at example.com', 'email from before');
+$bob->user_object->set_email('bob+test at example.com');
+is($bob->user_object->email, 'bob+test at example.com', 'email updated correctly');
+
 my $server = Jifty::Test->make_server;
 isa_ok($server, 'Jifty::Server');
 


More information about the Jifty-commit mailing list