Lines 868-876
subtest 'set_or_blank' => sub {
Link Here
|
868 |
$schema->storage->txn_rollback; |
868 |
$schema->storage->txn_rollback; |
869 |
}; |
869 |
}; |
870 |
|
870 |
|
871 |
subtest 'messages() and add_message() tests' => sub { |
871 |
subtest 'messages(), add_message() and reset_messages() tests' => sub { |
872 |
|
872 |
|
873 |
plan tests => 7; |
873 |
plan tests => 10; |
874 |
|
874 |
|
875 |
$schema->storage->txn_begin; |
875 |
$schema->storage->txn_begin; |
876 |
|
876 |
|
Lines 896-900
subtest 'messages() and add_message() tests' => sub {
Link Here
|
896 |
isnt( $patron->messages, undef, '->messages initializes the array if required' ); |
896 |
isnt( $patron->messages, undef, '->messages initializes the array if required' ); |
897 |
is( scalar @{ $patron->messages }, 0, '->messages returns an empty arrayref' ); |
897 |
is( scalar @{ $patron->messages }, 0, '->messages returns an empty arrayref' ); |
898 |
|
898 |
|
|
|
899 |
is( $messages[1]->message, 'message_2', 'Right message recorded' ); |
900 |
|
901 |
$patron->reset_messages; |
902 |
@messages = @{ $patron->messages }; |
903 |
is( scalar @messages, 0, 'No messages are returned' ); |
904 |
|
905 |
$patron->reset_messages; |
906 |
@messages = @{ $patron->messages }; |
907 |
is( scalar @messages, 0, 'No messages are returned, things ok when calling on already empty list' ); |
908 |
|
899 |
$schema->storage->txn_rollback; |
909 |
$schema->storage->txn_rollback; |
900 |
}; |
910 |
}; |
901 |
- |
|
|