View | Details | Raw Unified | Return to bug 21022
Collapse All | Expand All

(-)a/t/Koha/Exceptions.t (-2 / +6 lines)
Lines 22-28 use Test::Exception; Link Here
22
22
23
subtest 'Koha::Exceptions::Object::FKConstraint tests' => sub {
23
subtest 'Koha::Exceptions::Object::FKConstraint tests' => sub {
24
24
25
    plan tests => 3;
25
    plan tests => 5;
26
26
27
    use_ok('Koha::Exceptions::Object');
27
    use_ok('Koha::Exceptions::Object');
28
28
Lines 34-38 subtest 'Koha::Exceptions::Object::FKConstraint tests' => sub { Link Here
34
    # stringify the exception
34
    # stringify the exception
35
    is( "$@", 'Invalid parameter passed, nasty=fk does not exist', 'Exception stringified correctly' );
35
    is( "$@", 'Invalid parameter passed, nasty=fk does not exist', 'Exception stringified correctly' );
36
36
37
    throws_ok
38
        { Koha::Exceptions::Object::FKConstraint->throw( "Manual message exception" ) }
39
        'Koha::Exceptions::Object::FKConstraint',
40
        'Exception is thrown :-D';
41
    is( "$@", 'Manual message exception', 'Exception not stringified if manually passed' );
37
};
42
};
38
43
39
- 

Return to bug 21022