Bugzilla – Attachment 120486 Details for
Bug 28281
Installer doesn't work on some languages (pl-PL) because it double decodes installer data
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28281: Add tests
Bug-28281-Add-tests.patch (text/plain), 1.80 KB, created by
Jonathan Druart
on 2021-05-05 10:40:22 UTC
(
hide
)
Description:
Bug 28281: Add tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-05-05 10:40:22 UTC
Size:
1.80 KB
patch
obsolete
>From 82ed7099194eac23618b594fe6ff5b20e7369277 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 5 May 2021 11:50:16 +0200 >Subject: [PATCH] Bug 28281: Add tests > >--- > t/db_dependent/Installer.t | 26 +++++++++++++++++++++++++- > 1 file changed, 25 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Installer.t b/t/db_dependent/Installer.t >index be3bc350a95..c8cbe6ceb78 100755 >--- a/t/db_dependent/Installer.t >+++ b/t/db_dependent/Installer.t >@@ -22,7 +22,10 @@ > # Add more tests here!!! > > use Modern::Perl; >-use Test::More tests => 18; >+use Test::More tests => 19; >+use File::Temp qw(tempfile); >+use utf8; >+ > use Koha::Database; > > BEGIN { >@@ -70,3 +73,24 @@ ok( ! foreign_key_exists( 'borrowers', 'xxx' ), 'FK xxxx does not exist' ); > > ok( primary_key_exists( 'borrowers', 'borrowernumber'), 'Borrowers has primary key on borrowernumber'); > ok( ! primary_key_exists( 'borrowers', 'email'), 'Borrowers does not have a primary key on email'); >+ >+subtest 'marc_framework_sql_list' => sub { >+ plan tests => 1; >+ >+ my ($fh, $filepath) = tempfile( DIR => C4::Context->config("intranetdir") . "/installer/data/mysql/en/marcflavour/marc21/mandatory", SUFFIX => '.yml', UNLINK => 1 ); >+ print $fh Encode::encode_utf8("---\ndescription:\n - \"Standardowe typy haseÅ przedmiotowych MARC21\"\n"); >+ close $fh; >+ >+ my $yaml_files = $installer->marc_framework_sql_list('en', 'MARC21'); >+ >+ my $description; >+ FILE: for my $file ( @$yaml_files ) { >+ for my $framework ( @{ $file->{frameworks}} ) { >+ if ( $framework->{fwkfile} eq $filepath ) { >+ $description = $framework->{fwkdescription}->[0]; >+ last FILE; >+ } >+ } >+ } >+ is( $description, 'Standardowe typy haseÅ przedmiotowych MARC21' ); >+}; >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28281
:
120484
|
120486
|
120626
|
120627
|
120678
|
120679