|
Lines 113-119
subtest 'transit tests' => sub {
Link Here
|
| 113 |
$schema->storage->txn_rollback; |
113 |
$schema->storage->txn_rollback; |
| 114 |
}; |
114 |
}; |
| 115 |
|
115 |
|
| 116 |
subtest 'receipt tests' => sub { |
116 |
subtest 'receive tests' => sub { |
| 117 |
plan tests => 5; |
117 |
plan tests => 5; |
| 118 |
|
118 |
|
| 119 |
$schema->storage->txn_begin; |
119 |
$schema->storage->txn_begin; |
|
Lines 153-159
subtest 'receipt tests' => sub {
Link Here
|
| 153 |
); |
153 |
); |
| 154 |
is( ref($checkout), 'Koha::Checkout', 'Mock checkout added' ); |
154 |
is( ref($checkout), 'Koha::Checkout', 'Mock checkout added' ); |
| 155 |
|
155 |
|
| 156 |
throws_ok { $transfer->receipt() } |
156 |
throws_ok { $transfer->receive() } |
| 157 |
'Koha::Exceptions::Item::Transfer::Out', |
157 |
'Koha::Exceptions::Item::Transfer::Out', |
| 158 |
'Exception thrown if item is checked out'; |
158 |
'Exception thrown if item is checked out'; |
| 159 |
|
159 |
|
|
Lines 161-167
subtest 'receipt tests' => sub {
Link Here
|
| 161 |
|
161 |
|
| 162 |
# Transit state set |
162 |
# Transit state set |
| 163 |
$transfer->discard_changes; |
163 |
$transfer->discard_changes; |
| 164 |
$transfer->receipt(); |
164 |
$transfer->receive(); |
| 165 |
ok( $transfer->datearrived, 'Receipt set the datearrived for the transfer' ); |
165 |
ok( $transfer->datearrived, 'Receipt set the datearrived for the transfer' ); |
| 166 |
|
166 |
|
| 167 |
# Last seen |
167 |
# Last seen |
| 168 |
- |
|
|