Lines 17-23
Link Here
|
17 |
|
17 |
|
18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
19 |
|
19 |
|
20 |
use Test::More tests => 6; |
20 |
use Test::More tests => 7; |
21 |
use Test::Warn; |
21 |
use Test::Warn; |
22 |
|
22 |
|
23 |
use C4::Context; |
23 |
use C4::Context; |
Lines 89-92
subtest 'get_column' => sub {
Link Here
|
89 |
my $patron = Koha::Patron->new({categorycode => $categorycode, branchcode => $branchcode })->store; |
89 |
my $patron = Koha::Patron->new({categorycode => $categorycode, branchcode => $branchcode })->store; |
90 |
is( $patron->get_column('borrowernumber'), $patron->borrowernumber, 'get_column should retrieve the correct value' ); |
90 |
is( $patron->get_column('borrowernumber'), $patron->borrowernumber, 'get_column should retrieve the correct value' ); |
91 |
}; |
91 |
}; |
|
|
92 |
|
93 |
subtest 'discard_changes' => sub { |
94 |
plan tests => 1; |
95 |
my $builder = t::lib::TestBuilder->new; |
96 |
my $patron = $builder->build( { source => 'Borrower' } ); |
97 |
$patron->dateexpiry(dt_from_string); |
98 |
$patron->discard_changes; |
99 |
is( |
100 |
$patron->dateexpiry, |
101 |
dt_from_string->truncate( to => 'day' ), |
102 |
'discard_changes should refresh the object' |
103 |
); |
104 |
}; |
105 |
|
92 |
1; |
106 |
1; |
93 |
- |
|
|