View | Details | Raw Unified | Return to bug 13967
Collapse All | Expand All

(-)a/t/db_dependent/Borrowers.t (-1 / +4 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 12;
20
use Test::More tests => 13;
21
use Test::Warn;
21
use Test::Warn;
22
22
23
use C4::Context;
23
use C4::Context;
Lines 72-77 is( $b1->surname(), $b1_new->surname(), "Found matching borrower" ); Link Here
72
my @borrowers = Koha::Borrowers->search( { branchcode => $branchcode } );
72
my @borrowers = Koha::Borrowers->search( { branchcode => $branchcode } );
73
is( @borrowers, 3, "Found 3 borrowers with Search" );
73
is( @borrowers, 3, "Found 3 borrowers with Search" );
74
74
75
my $unexistent = Koha::Borrowers->find( '1234567890' );
76
is( $unexistent, undef, 'Koha::Objects->Find should return undef if the record does not exist' );
77
75
my $borrowers = Koha::Borrowers->search( { branchcode => $branchcode } );
78
my $borrowers = Koha::Borrowers->search( { branchcode => $branchcode } );
76
is( $borrowers->count( { branchcode => $branchcode } ), 3, "Counted 3 borrowers with Count" );
79
is( $borrowers->count( { branchcode => $branchcode } ), 3, "Counted 3 borrowers with Count" );
77
80
(-)a/t/db_dependent/sysprefs.t (-5 / +6 lines)
Lines 19-25 Link Here
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use Test::More tests => 4;
22
use Test::More tests => 5;
23
use C4::Context;
23
use C4::Context;
24
24
25
# Start transaction
25
# Start transaction
Lines 31-40 my $opacheader = C4::Context->preference('opacheader'); Link Here
31
my $newopacheader = "newopacheader";
31
my $newopacheader = "newopacheader";
32
32
33
C4::Context->set_preference( 'OPACHEADER', $newopacheader );
33
C4::Context->set_preference( 'OPACHEADER', $newopacheader );
34
is( C4::Context->preference('opacheader'), $newopacheader );
34
is( C4::Context->preference('opacheader'), $newopacheader, 'The pref should have been set correctly' );
35
35
36
C4::Context->set_preference( 'opacheader', $opacheader );
36
C4::Context->set_preference( 'opacheader', $opacheader );
37
is( C4::Context->preference('OPACHEADER'), $opacheader );
37
is( C4::Context->preference('OPACHEADER'), $opacheader, 'A pref name should be case insensitive');
38
38
39
$ENV{OVERRIDE_SYSPREF_opacheader} = 'this is an override';
39
$ENV{OVERRIDE_SYSPREF_opacheader} = 'this is an override';
40
C4::Context->clear_syspref_cache();
40
C4::Context->clear_syspref_cache();
Lines 44-48 is( Link Here
44
    'system preference value overridden from environment'
44
    'system preference value overridden from environment'
45
);
45
);
46
46
47
is( C4::Context->preference('IDoNotExist'), undef, 'Get a non-existent system preference should return undef');
48
47
C4::Context->set_preference( 'IDoNotExist', 'NonExistent' );
49
C4::Context->set_preference( 'IDoNotExist', 'NonExistent' );
48
is( C4::Context->preference('IDoNotExist'), 'NonExistent', 'Test creation of non-existant system preferencer' );
50
is( C4::Context->preference('IDoNotExist'), 'NonExistent', 'Test creation of non-existent system preference' );
49
- 

Return to bug 13967