|
Lines 100-106
subtest 'Relation accessor tests' => sub {
Link Here
|
| 100 |
}; |
100 |
}; |
| 101 |
|
101 |
|
| 102 |
subtest 'store() tests' => sub { |
102 |
subtest 'store() tests' => sub { |
| 103 |
plan tests => 12; |
103 |
plan tests => 13; |
| 104 |
$schema->storage->txn_begin; |
104 |
$schema->storage->txn_begin; |
| 105 |
|
105 |
|
| 106 |
my $patron = $builder->build_object( { class => "Koha::Patrons" } ); |
106 |
my $patron = $builder->build_object( { class => "Koha::Patrons" } ); |
|
Lines 279-283
subtest 'store() tests' => sub {
Link Here
|
| 279 |
ok( $booking->in_storage, 'Booking stored OK when item not specified and the booking slot is available' ); |
279 |
ok( $booking->in_storage, 'Booking stored OK when item not specified and the booking slot is available' ); |
| 280 |
ok( $booking->item_id, 'An item was assigned to the booking' ); |
280 |
ok( $booking->item_id, 'An item was assigned to the booking' ); |
| 281 |
|
281 |
|
|
|
282 |
subtest '_assign_item_for_booking() tests' => sub { |
| 283 |
plan tests => 1; |
| 284 |
is( $booking->item_id, $item_1->itemnumber, "Item 1 was assigned to the booking" ); |
| 285 |
|
| 286 |
# Bookings |
| 287 |
# ✓ Item 1 |----| |
| 288 |
# ✓ Item 2 |--| |
| 289 |
# ✓ Any (1) |--| |
| 290 |
}; |
| 291 |
|
| 282 |
$schema->storage->txn_rollback; |
292 |
$schema->storage->txn_rollback; |
| 283 |
}; |
293 |
}; |
| 284 |
- |
|
|