Lines 1-7
Link Here
|
1 |
#!/usr/bin/perl |
1 |
#!/usr/bin/perl |
2 |
|
2 |
|
3 |
use Modern::Perl; |
3 |
use Modern::Perl; |
4 |
use Test::More tests => 9; |
4 |
use Test::More tests => 10; |
5 |
use Try::Tiny; |
5 |
use Try::Tiny; |
6 |
|
6 |
|
7 |
use t::lib::TestBuilder; |
7 |
use t::lib::TestBuilder; |
Lines 39-46
try {
Link Here
|
39 |
} |
39 |
} |
40 |
)->store(); |
40 |
)->store(); |
41 |
} catch { |
41 |
} catch { |
42 |
ok( $_->isa('Koha::Exceptions::Koha::Patron::Modification::DuplicateVerificationToken'), |
42 |
ok( $_->isa('Koha::Exceptions::Patron::Modification::DuplicateVerificationToken'), |
43 |
'Attempting to add a duplicate verification token to the database should raise a Koha::Exceptions::Koha::Patron::Modification::DuplicateVerificationToken exception' ); |
43 |
'Attempting to add a duplicate verification token to the database should raise a Koha::Exceptions::Koha::Patron::Modification::DuplicateVerificationToken exception' ); |
|
|
44 |
is( $_->message, "Duplicate verification token 1234567890", 'Exception carries the right message' ); |
44 |
}; |
45 |
}; |
45 |
|
46 |
|
46 |
## Get the new pending modification |
47 |
## Get the new pending modification |
47 |
- |
|
|