Lines 19-25
Link Here
|
19 |
|
19 |
|
20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
21 |
|
21 |
|
22 |
use Test::More tests => 6; |
22 |
use Test::More tests => 7; |
23 |
use Test::Warn; |
23 |
use Test::Warn; |
24 |
|
24 |
|
25 |
use Koha::Authority::Types; |
25 |
use Koha::Authority::Types; |
Lines 67-72
subtest 'reset' => sub {
Link Here
|
67 |
is( $patrons->reset->next->borrowernumber, $first_borrowernumber, 'Koha::Objects->reset should work as expected'); |
67 |
is( $patrons->reset->next->borrowernumber, $first_borrowernumber, 'Koha::Objects->reset should work as expected'); |
68 |
}; |
68 |
}; |
69 |
|
69 |
|
|
|
70 |
subtest 'delete' => sub { |
71 |
plan tests => 2; |
72 |
my $builder = t::lib::TestBuilder->new; |
73 |
my $patron_1 = $builder->build({source => 'Borrower'}); |
74 |
my $patron_2 = $builder->build({source => 'Borrower'}); |
75 |
is( Koha::Patrons->search({ -or => { borrowernumber => [ $patron_1->{borrowernumber}, $patron_2->{borrowernumber}]}})->delete, 2, ''); |
76 |
is( Koha::Patrons->search({ -or => { borrowernumber => [ $patron_1->{borrowernumber}, $patron_2->{borrowernumber}]}})->count, 0, ''); |
77 |
}; |
78 |
|
70 |
subtest 'not_covered_yet' => sub { |
79 |
subtest 'not_covered_yet' => sub { |
71 |
plan tests => 1; |
80 |
plan tests => 1; |
72 |
warning_is { Koha::Patrons->search->not_covered_yet } { carped => 'The method not_covered_yet is not covered by tests' }, "If a method is not covered by tests, the AUTOLOAD method won't execute the method"; |
81 |
warning_is { Koha::Patrons->search->not_covered_yet } { carped => 'The method not_covered_yet is not covered by tests' }, "If a method is not covered by tests, the AUTOLOAD method won't execute the method"; |
73 |
- |
|
|