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

(-)a/t/db_dependent/Koha/ILL/Request/Workflow/HistoryCheck.t (-2 / +16 lines)
Lines 35-41 my $isbn = '321321321'; Link Here
35
35
36
subtest 'show_history_check' => sub {
36
subtest 'show_history_check' => sub {
37
37
38
    plan tests => 6;
38
    plan tests => 7;
39
39
40
    $schema->storage->txn_begin;
40
    $schema->storage->txn_begin;
41
41
Lines 103-108 subtest 'show_history_check' => sub { Link Here
103
        1, 'Request with ISBN ' . $isbn . ' exists, syspref is on and is same patron. Able to show history check screen'
103
        1, 'Request with ISBN ' . $isbn . ' exists, syspref is on and is same patron. Able to show history check screen'
104
    );
104
    );
105
105
106
    my $metadata_with_no_cardnumber = {
107
        title      => 'This is a title',
108
        author     => 'This is an author',
109
        isbn       => $isbn,
110
    };
111
112
    my $ill_request_with_no_borrowernumber = $builder->build_sample_ill_request({borrowernumber => undef});
113
114
    my $new_opac_history_check = Koha::ILL::Request::Workflow::HistoryCheck->new( $metadata_with_no_cardnumber, 'staff' );
115
116
    is(
117
        $new_opac_history_check->show_history_check($ill_request_with_no_borrowernumber),
118
        0, 'Don\'t show history check for unauthenticated requests'
119
    );
120
106
    # Mock ILLHistoryCheck disabled
121
    # Mock ILLHistoryCheck disabled
107
    t::lib::Mocks::mock_preference( 'ILLHistoryCheck', 0 );
122
    t::lib::Mocks::mock_preference( 'ILLHistoryCheck', 0 );
108
123
109
- 

Return to bug 39875