|
Lines 21-27
use Modern::Perl;
Link Here
|
| 21 |
use utf8; |
21 |
use utf8; |
| 22 |
|
22 |
|
| 23 |
use Test::NoWarnings; |
23 |
use Test::NoWarnings; |
| 24 |
use Test::More tests => 42; |
24 |
use Test::More tests => 46; |
| 25 |
use Test::Exception; |
25 |
use Test::Exception; |
| 26 |
use Test::MockModule; |
26 |
use Test::MockModule; |
| 27 |
use Test::Warn; |
27 |
use Test::Warn; |
|
Lines 3923-3928
subtest 'effective_bookable() tests' => sub {
Link Here
|
| 3923 |
$schema->storage->txn_rollback; |
3923 |
$schema->storage->txn_rollback; |
| 3924 |
}; |
3924 |
}; |
| 3925 |
|
3925 |
|
|
|
3926 |
subtest 'effective_homebranch() test' => sub { |
| 3927 |
plan tests => 3; |
| 3928 |
|
| 3929 |
$schema->storage->txn_begin; |
| 3930 |
|
| 3931 |
my $item = $builder->build_sample_item(); |
| 3932 |
|
| 3933 |
is( $item->homebranch, $item->effective_homebranch, 'homebranch() and effective_homebranch() matches by default' ); |
| 3934 |
is_deeply( |
| 3935 |
$item->home_branch, $item->effective_home_branch, |
| 3936 |
'home_branch() and effective_home_branch() matches by default' |
| 3937 |
); |
| 3938 |
is_deeply( |
| 3939 |
$item->home_library, $item->effective_home_library, |
| 3940 |
'home_library() and effective_home_library() matches by default' |
| 3941 |
); |
| 3942 |
|
| 3943 |
$schema->storage->txn_rollback; |
| 3944 |
}; |
| 3945 |
|
| 3946 |
subtest 'effective_holdingbranch() test' => sub { |
| 3947 |
plan tests => 3; |
| 3948 |
|
| 3949 |
$schema->storage->txn_begin; |
| 3950 |
|
| 3951 |
my $item = $builder->build_sample_item(); |
| 3952 |
|
| 3953 |
is( |
| 3954 |
$item->holdingbranch, $item->effective_holdingbranch, |
| 3955 |
'holdingbranch() and effective_holdingbranch() matches by default' |
| 3956 |
); |
| 3957 |
is_deeply( |
| 3958 |
$item->holding_branch, $item->effective_holding_branch, |
| 3959 |
'holding_branch() and effective_holding_branch() matches by default' |
| 3960 |
); |
| 3961 |
is_deeply( |
| 3962 |
$item->holding_library, $item->effective_holding_library, |
| 3963 |
'holding_library() and effective_holding_library() matches by default' |
| 3964 |
); |
| 3965 |
|
| 3966 |
$schema->storage->txn_rollback; |
| 3967 |
}; |
| 3968 |
|
| 3969 |
subtest 'effective_collection_code() test' => sub { |
| 3970 |
plan tests => 1; |
| 3971 |
|
| 3972 |
$schema->storage->txn_begin; |
| 3973 |
|
| 3974 |
my $item = $builder->build_sample_item(); |
| 3975 |
|
| 3976 |
is( $item->ccode, $item->effective_collection_code, 'ccode() and effective_collection_code() matches by default' ); |
| 3977 |
|
| 3978 |
$schema->storage->txn_rollback; |
| 3979 |
}; |
| 3980 |
|
| 3981 |
subtest 'effective_itemtype() test' => sub { |
| 3982 |
plan tests => 1; |
| 3983 |
|
| 3984 |
$schema->storage->txn_begin; |
| 3985 |
|
| 3986 |
my $item = $builder->build_sample_item(); |
| 3987 |
|
| 3988 |
is( $item->itype, $item->effective_itemtype, 'itype() and effective_itemtype() matches by default' ); |
| 3989 |
|
| 3990 |
$schema->storage->txn_rollback; |
| 3991 |
}; |
| 3992 |
|
| 3926 |
subtest 'holds_fee() tests' => sub { |
3993 |
subtest 'holds_fee() tests' => sub { |
| 3927 |
plan tests => 3; |
3994 |
plan tests => 3; |
| 3928 |
|
3995 |
|
| 3929 |
- |
|
|