|
Lines 19-25
$dbh->{AutoCommit} = 0;
Link Here
|
| 19 |
teardown(); |
19 |
teardown(); |
| 20 |
|
20 |
|
| 21 |
subtest 'CRUD' => sub { |
21 |
subtest 'CRUD' => sub { |
| 22 |
plan tests => 13; |
22 |
plan tests => 14; |
| 23 |
my $patron = $builder->build({ |
23 |
my $patron = $builder->build({ |
| 24 |
source => 'Borrower', |
24 |
source => 'Borrower', |
| 25 |
}); |
25 |
}); |
|
Lines 44-49
subtest 'CRUD' => sub {
Link Here
|
| 44 |
is( $shelf->allow_delete_other, 0, 'The default value for allow_delete_other should be 0' ); |
44 |
is( $shelf->allow_delete_other, 0, 'The default value for allow_delete_other should be 0' ); |
| 45 |
is( output_pref($shelf->created_on), output_pref(dt_from_string), 'The creation time should have been set to today' ); |
45 |
is( output_pref($shelf->created_on), output_pref(dt_from_string), 'The creation time should have been set to today' ); |
| 46 |
|
46 |
|
|
|
47 |
my $shelf_18672 = Koha::Virtualshelves->find( $shelf->shelfnumber ); # Bug 18672 |
| 48 |
my $created_18672 = $shelf_18672->created_on; |
| 49 |
sleep 2; # Wait 2 seconds, then store |
| 50 |
$shelf->store; |
| 51 |
$shelf_18672 = Koha::Virtualshelves->find( $shelf->shelfnumber ); |
| 52 |
is($shelf_18672->created_on, $created_18672, 'Creation date is the same after update (Bug 18672)' ); |
| 53 |
|
| 47 |
my $retrieved_shelf = Koha::Virtualshelves->find( $shelf->shelfnumber ); |
54 |
my $retrieved_shelf = Koha::Virtualshelves->find( $shelf->shelfnumber ); |
| 48 |
|
55 |
|
| 49 |
is( $retrieved_shelf->shelfname, $shelf->shelfname, 'Find should correctly return the shelfname' ); |
56 |
is( $retrieved_shelf->shelfname, $shelf->shelfname, 'Find should correctly return the shelfname' ); |
| 50 |
- |
|
|