Lines 214-220
subtest 'login_attempts tests' => sub {
Link Here
|
214 |
|
214 |
|
215 |
subtest 'is_superlibrarian() tests' => sub { |
215 |
subtest 'is_superlibrarian() tests' => sub { |
216 |
|
216 |
|
217 |
plan tests => 2; |
217 |
plan tests => 3; |
218 |
|
218 |
|
219 |
$schema->storage->txn_begin; |
219 |
$schema->storage->txn_begin; |
220 |
|
220 |
|
Lines 228-237
subtest 'is_superlibrarian() tests' => sub {
Link Here
|
228 |
} |
228 |
} |
229 |
); |
229 |
); |
230 |
|
230 |
|
231 |
ok( !$patron->is_superlibrarian, 'Patron is not a superlibrarian and the method returns the correct value' ); |
231 |
is( $patron->is_superlibrarian, 0, 'Patron is not a superlibrarian and the method returns the correct value' ); |
232 |
|
232 |
|
233 |
$patron->flags(1)->store->discard_changes; |
233 |
$patron->flags(1)->store->discard_changes; |
234 |
ok( $patron->is_superlibrarian, 'Patron is a superlibrarian and the method returns the correct value' ); |
234 |
is( $patron->is_superlibrarian, 1, 'Patron is a superlibrarian and the method returns the correct value' ); |
|
|
235 |
|
236 |
$patron->flags(0)->store->discard_changes; |
237 |
is( $patron->is_superlibrarian, 0, 'Patron is not a superlibrarian and the method returns the correct value' ); |
235 |
|
238 |
|
236 |
$schema->storage->txn_rollback; |
239 |
$schema->storage->txn_rollback; |
237 |
}; |
240 |
}; |
238 |
- |
|
|