|
Lines 1055-1078
subtest 'Backend core methods' => sub {
Link Here
|
| 1055 |
is( $copyright_content->count, 1 ); |
1055 |
is( $copyright_content->count, 1 ); |
| 1056 |
|
1056 |
|
| 1057 |
$backend_create_result = |
1057 |
$backend_create_result = |
| 1058 |
$illrq->backend_create( |
1058 |
$illrq->backend_create( { opac => 1, branchcode => $illrq->patron->branchcode }, $illrq->patron ); |
| 1059 |
{ opac => 1, branchcode => $illrq->patron->branchcode, cardnumber => $illrq->patron->cardnumber } ); |
|
|
| 1060 |
is( |
1059 |
is( |
| 1061 |
$backend_create_result->{stage}, 'copyrightclearance', |
1060 |
$backend_create_result->{stage}, 'copyrightclearance', |
| 1062 |
'Additional contents found for provided cardnumber\'s library, should be copyrightclearance stage' |
1061 |
'Additional contents found for logged in user\'s library, should be copyrightclearance stage' |
| 1063 |
); |
1062 |
); |
| 1064 |
|
1063 |
|
| 1065 |
$backend_create_result = $illrq->backend_create( { opac => 1, branchcode => $illrq->patron->branchcode } ); |
1064 |
$backend_create_result = $illrq->backend_create( { opac => 1, branchcode => $illrq->patron->branchcode } ); |
| 1066 |
is( |
1065 |
is( |
| 1067 |
$backend_create_result->{stage}, 'commit', |
1066 |
$backend_create_result->{stage}, 'commit', |
| 1068 |
'Cardnumber not supplied and couldnt find additional_contents for all libraries. Dont show copyrightclearance' |
1067 |
'Logged in patron not supplied and could not find additional_contents for all libraries. Dont show copyrightclearance' |
| 1069 |
); |
1068 |
); |
| 1070 |
|
1069 |
|
| 1071 |
my $patron_1 = $builder->build_object( { class => 'Koha::Patrons' } ); |
1070 |
my $patron_1 = $builder->build_object( { class => 'Koha::Patrons' } ); |
| 1072 |
$backend_create_result = $illrq->backend_create( { opac => 1, branchcode => $patron_1->branchcode } ); |
1071 |
$backend_create_result = $illrq->backend_create( { opac => 1, branchcode => $patron_1->branchcode } ); |
| 1073 |
is( |
1072 |
is( |
| 1074 |
$backend_create_result->{stage}, 'commit', |
1073 |
$backend_create_result->{stage}, 'commit', |
| 1075 |
'Supplied cardnumber\'s branchcode doesnt match any additional_contents of same branchcode. Dont show copyrightclearance' |
1074 |
'Logged in user\'s branchcode does not match any additional_contents of same branchcode. Dont show copyrightclearance' |
| 1076 |
); |
1075 |
); |
| 1077 |
|
1076 |
|
| 1078 |
my $all_libraries_copyright_content = Koha::AdditionalContents->search_for_display( |
1077 |
my $all_libraries_copyright_content = Koha::AdditionalContents->search_for_display( |
|
Lines 1109-1115
subtest 'Backend core methods' => sub {
Link Here
|
| 1109 |
$backend_create_result = $illrq->backend_create( { opac => 1, branchcode => $illrq->patron->branchcode } ); |
1108 |
$backend_create_result = $illrq->backend_create( { opac => 1, branchcode => $illrq->patron->branchcode } ); |
| 1110 |
is( |
1109 |
is( |
| 1111 |
$backend_create_result->{stage}, 'copyrightclearance', |
1110 |
$backend_create_result->{stage}, 'copyrightclearance', |
| 1112 |
'Cardnumber not supplied, found additional_contents for all libraries. Should show copyrightclearance' |
1111 |
'Logged in user not supplied, found additional_contents for all libraries. Should show copyrightclearance' |
| 1113 |
); |
1112 |
); |
| 1114 |
|
1113 |
|
| 1115 |
$all_libraries_copyright_content = Koha::AdditionalContents->search_for_display( |
1114 |
$all_libraries_copyright_content = Koha::AdditionalContents->search_for_display( |
| 1116 |
- |
|
|