89db872b41
* Koha/Patrons.pm (search_housebound_choosers) (search_housebound_deliverers): Use new table. Signed-off-by: Claire Gravely <claire_gravely@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
39 lines
751 B
Perl
Executable file
39 lines
751 B
Perl
Executable file
#!/usr/bin/perl
|
|
use Modern::Perl;
|
|
|
|
use C4::Members;
|
|
use C4::Circulation;
|
|
use Koha::Database;
|
|
use Koha::Patrons;
|
|
|
|
use Test::More tests => 2;
|
|
|
|
use_ok('Koha::Patron');
|
|
|
|
use t::lib::TestBuilder;
|
|
use t::lib::Mocks;
|
|
|
|
my $schema = Koha::Database->new->schema;
|
|
$schema->storage->txn_begin;
|
|
|
|
my $builder = t::lib::TestBuilder->new;
|
|
|
|
my $patron = $builder->build({ source => 'Borrower' });
|
|
my $profile = $builder->build({
|
|
source => 'HouseboundProfile',
|
|
value => {
|
|
borrowernumber => $patron->{borrowernumber},
|
|
},
|
|
});
|
|
|
|
# Test housebound_profile
|
|
is(
|
|
Koha::Patrons->find($patron->{borrowernumber})
|
|
->housebound_profile->frequency,
|
|
$profile->{frequency},
|
|
"Fetch housebound_profile."
|
|
);
|
|
|
|
$schema->storage->txn_rollback;
|
|
|
|
1;
|