--- t/00-model-User.t 2008/03/30 16:58:21 42 +++ t/00-model-Person.t 2008/04/09 23:14:47 66 @@ -4,14 +4,14 @@ =head1 DESCRIPTION -A basic test harness for the User model. +A basic test harness for the Person model. =cut use Jifty::Test tests => 11; # Make sure we can load the model -use_ok('A3C::Model::User'); +use_ok('A3C::Model::Person'); # Grab a system user my $system_user = A3C::CurrentUser->superuser; @@ -31,7 +31,7 @@ =cut # Try testing a create -my $o = A3C::Model::User->new(current_user => $system_user); +my $o = A3C::Model::Person->new(current_user => $system_user); ($id) = $o->create( uid => 42, hrEduPersonUniqueID => 42, @@ -44,8 +44,8 @@ hrEduPersonHomeOrg => 'skole.hr', # organization => $organization, ); -ok($id, "User create returned success"); -ok($o->id, "New User has valid id set"); +ok($id, "Person create returned success"); +ok($o->id, "New Person has valid id set"); is($o->id, $id, "Create returned the right id"); # And another @@ -61,11 +61,11 @@ hrEduPersonHomeOrg => 'skole.hr', # organization => $organization, ); -ok($o->id, "User create returned another value"); +ok($o->id, "Person create returned another value"); isnt($o->id, $id, "And it is different from the previous one"); # Searches in general -my $collection = A3C::Model::UserCollection->new(current_user => $system_user); +my $collection = A3C::Model::PersonCollection->new(current_user => $system_user); $collection->unlimit; is($collection->count, 2, "Finds two records");