Koha/t/db_dependent/Patron/Housebound.t
Jonathan Druart b1ba7fac2c Bug 18292: Remove return 1 statements in tests
The test files do not need to return 1

Patch generated with:
perl -p -i -e "s/^1;\n//xsm" t/**/*.t

Test plan:
  git grep '^1;$' t/**/*.t
should not return any results

NOTE: does not fix C4/SIP/t, nor xt tests.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-08-15 12:17:42 -03:00

38 lines
748 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;