Bug 18461: Make tests break on wrong UTF8 data handilng
This patch makes the tests fail if extended attributes handling fails due to wrong UTF-8 data handling. To test: - Run: $ sudo koha-shell kohadev k$ cd kohaclone k$ prove t/db_dependent/Koha/Patron/Modifications.t => FAIL: Tests explode Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
bcc0465276
commit
11d4ad19aa
|
|
@ -17,6 +17,8 @@
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use utf8;
|
||||
|
||||
use Test::More tests => 6;
|
||||
use Test::Exception;
|
||||
|
||||
|
|
@ -304,7 +306,7 @@ subtest 'pending_count() and pending() tests' => sub {
|
|||
surname => 'Smith',
|
||||
firstname => 'Sandy',
|
||||
verification_token => $verification_token_2,
|
||||
extended_attributes => '[{"code":"CODE_2","value":"chau"},{"code":"CODE_2","value":"ciao"}]'
|
||||
extended_attributes => '[{"code":"CODE_2","value":"año"},{"code":"CODE_2","value":"ciao"}]'
|
||||
}
|
||||
)->store();
|
||||
|
||||
|
|
@ -341,7 +343,7 @@ subtest 'pending_count() and pending() tests' => sub {
|
|||
is( ref($p2_pm_attribute_1), 'Koha::Patron::Attribute', 'patron modification has single attribute object' );
|
||||
is( ref($p2_pm_attribute_2), 'Koha::Patron::Attribute', 'patron modification has single attribute object' );
|
||||
|
||||
is( $p2_pm_attribute_1->attribute, 'chau', 'patron modification has the right attribute change' );
|
||||
is( $p2_pm_attribute_1->attribute, 'año', 'patron modification has the right attribute change' );
|
||||
is( $p2_pm_attribute_2->attribute, 'ciao', 'patron modification has the right attribute change' );
|
||||
|
||||
is( Koha::Patron::Modifications->pending_count($library_1),
|
||||
|
|
|
|||
Loading…
Reference in New Issue