Testing using the helper in the developer model to retrieve the applications
instead of the dao function in application.
This commit is contained in:
parent
138e21137a
commit
04824db8f4
@ -74,7 +74,8 @@ use Peace::DAO::Application;
|
|||||||
email => 'larry@perl.org',
|
email => 'larry@perl.org',
|
||||||
country => 'US',
|
country => 'US',
|
||||||
verified => 0,
|
verified => 0,
|
||||||
secret_bcrypt => $secret_bcrypt
|
secret_bcrypt => $secret_bcrypt,
|
||||||
|
dbh => $dbh,
|
||||||
);
|
);
|
||||||
my $developer_dao = Peace::DAO::Developer->new( dbh => $dbh );
|
my $developer_dao = Peace::DAO::Developer->new( dbh => $dbh );
|
||||||
$developer_dao->create( developer => $developer );
|
$developer_dao->create( developer => $developer );
|
||||||
@ -94,11 +95,10 @@ use Peace::DAO::Application;
|
|||||||
$application_dao->create( application => $application );
|
$application_dao->create( application => $application );
|
||||||
|
|
||||||
## WHEN
|
## WHEN
|
||||||
my $applicatios =
|
my $applications = $developer->applications;
|
||||||
$application_dao->recover_by_developer( developer => $developer );
|
|
||||||
|
|
||||||
## THEN
|
## THEN
|
||||||
ok @$applicatios, 'Applications was at least a element.';
|
ok @$applications, 'Applications was at least a element.';
|
||||||
ok $applicatios->[0]->isa('Peace::Model::Application'),
|
ok $applications->[0]->isa('Peace::Model::Application'),
|
||||||
'Application is made of developer.';
|
'Application is made of developer.';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user