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

(-)a/t/db_dependent/Circulation/MarkIssueReturned.t (-3 / +16 lines)
Lines 44-55 my %item_branch_infos = ( Link Here
44
    holdingbranch => $branchcode,
44
    holdingbranch => $branchcode,
45
);
45
);
46
46
47
my $borrowernumber = AddMember( categorycode => $categorycode, branchcode => $branchcode );
47
my $patron = $builder->build({
48
    source => 'Borrower',
49
    value => {
50
        categorycode => $categorycode,
51
        branchcode => $branchcode,
52
    },
53
});
54
my $borrowernumber = $patron->{borrowernumber};
48
55
49
eval { C4::Circulation::MarkIssueReturned( $borrowernumber, 'itemnumber', 'dropbox_branch', 'returndate', 2 ) };
56
eval { C4::Circulation::MarkIssueReturned( $borrowernumber, 'itemnumber', 'dropbox_branch', 'returndate', 2 ) };
50
like ( $@, qr<Fatal error: the patron \(\d+\) .* AnonymousPatron>, );
57
like ( $@, qr<Fatal error: the patron \(\d+\) .* AnonymousPatron>, );
51
58
52
my $anonymous_borrowernumber = AddMember( categorycode => $categorycode, branchcode => $branchcode );
59
my $anonymous_patron = $builder->build({
60
    source => 'Borrower',
61
    value => {
62
        categorycode => $categorycode,
63
        branchcode => $branchcode,
64
    },
65
});
66
my $anonymous_borrowernumber = $anonymous_patron->{borrowernumber};
53
t::lib::Mocks::mock_preference('AnonymousPatron', $anonymous_borrowernumber);
67
t::lib::Mocks::mock_preference('AnonymousPatron', $anonymous_borrowernumber);
54
# The next call will raise an error, because data are not correctly set
68
# The next call will raise an error, because data are not correctly set
55
$dbh->{PrintError} = 0;
69
$dbh->{PrintError} = 0;
56
- 

Return to bug 17917