Bug 26581: Only reindex records once per checkin
[koha.git] / t / db_dependent / Patron / Housebound.t
blobb5024bc4df94c60d3fb39ee17a5fafb167b5cb2c
1 #!/usr/bin/perl
2 use Modern::Perl;
4 use C4::Members;
5 use C4::Circulation;
6 use Koha::Database;
7 use Koha::Patrons;
9 use Test::More tests => 2;
11 use_ok('Koha::Patron');
13 use t::lib::TestBuilder;
14 use t::lib::Mocks;
16 my $schema = Koha::Database->new->schema;
17 $schema->storage->txn_begin;
19 my $builder = t::lib::TestBuilder->new;
21 my $patron = $builder->build({ source => 'Borrower' });
22 my $profile = $builder->build({
23 source => 'HouseboundProfile',
24 value => {
25 borrowernumber => $patron->{borrowernumber},
27 });
29 # Test housebound_profile
30 is(
31 Koha::Patrons->find($patron->{borrowernumber})
32 ->housebound_profile->frequency,
33 $profile->{frequency},
34 "Fetch housebound_profile."
37 $schema->storage->txn_rollback;