Bug 36687: (RM follow-up) Fix more unit tests
Use currency.active to test `int(1) DEFAULT NULL` now that itemtypes.notforloan is `NOT NULL DEFAULT '0'` Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
fba56f0178
commit
26e7ed29af
1 changed files with 9 additions and 1 deletions
|
@ -1001,9 +1001,17 @@ subtest 'store() tests' => sub {
|
||||||
};
|
};
|
||||||
is( $@, '', 'No error should be raised by ->store if empty strings are passed' );
|
is( $@, '', 'No error should be raised by ->store if empty strings are passed' );
|
||||||
is( $itemtype->rentalcharge, undef, 'decimal DEFAULT NULL should default to null');
|
is( $itemtype->rentalcharge, undef, 'decimal DEFAULT NULL should default to null');
|
||||||
is( $itemtype->notforloan, undef, 'int DEFAULT NULL should default to null');
|
|
||||||
is( $itemtype->hideinopac, 0, 'int NOT NULL DEFAULT 0 should default to 0');
|
is( $itemtype->hideinopac, 0, 'int NOT NULL DEFAULT 0 should default to 0');
|
||||||
|
|
||||||
|
my $currency = eval {
|
||||||
|
Koha::Acquisition::Currency->new(
|
||||||
|
{
|
||||||
|
active => 'IT4test',
|
||||||
|
}
|
||||||
|
)->store;
|
||||||
|
};
|
||||||
|
is( $currency->active, undef, 'int DEFAULT NULL should default to null');
|
||||||
|
|
||||||
subtest 'Bad value tests' => sub {
|
subtest 'Bad value tests' => sub {
|
||||||
|
|
||||||
plan tests => 3;
|
plan tests => 3;
|
||||||
|
|
Loading…
Reference in a new issue