X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=t%2Fdb_dependent%2FKoha%2FObject.t;h=7630105e8e1fb8ea996300f2ad9d11d46616258b;hb=ef410fd62f279a10687636a4f26babb2c91ecadc;hp=a00083a5b7072e60ead414d0f67e5b8c7eb4f442;hpb=ae927390ffabdc26d66b254a17abbe81e6683279;p=koha.git diff --git a/t/db_dependent/Koha/Object.t b/t/db_dependent/Koha/Object.t index a00083a5b7..7630105e8e 100755 --- a/t/db_dependent/Koha/Object.t +++ b/t/db_dependent/Koha/Object.t @@ -25,10 +25,10 @@ use DateTime; use C4::Context; use C4::Biblio; # AddBiblio use C4::Circulation; # AddIssue -use C4::Members;# AddMember use Koha::Database; use Koha::DateUtils qw( dt_from_string ); use Koha::Libraries; +use Koha::Patrons; use Scalar::Util qw( isvstring ); use Try::Tiny; @@ -352,8 +352,7 @@ subtest 'unblessed_all_relateds' => sub { categorycode => $patron_category->{categorycode}, branchcode => $library->branchcode, }; - my $borrowernumber = C4::Members::AddMember(%$patron_data); - my $patron = Koha::Patrons->find( $borrowernumber ); + my $patron = Koha::Patron->new($patron_data)->store; my ($biblionumber) = AddBiblio( MARC::Record->new, '' ); my $biblio = Koha::Biblios->find( $biblionumber ); my $item = $builder->build_object(