Bug 23681: (QA follow-up) Rename columns
[koha-ffzg.git] / t / db_dependent / yaml.t
index 177ce18..586c053 100755 (executable)
@@ -1,22 +1,18 @@
 use Modern::Perl;
 use Test::More;
 
-use YAML::Syck;
+use YAML::XS;
 use Template;
+use Encode;
 use utf8;
 
-$YAML::Syck::ImplicitTyping = 1;
-$YAML::Syck::ImplicitUnicode = 1;
-
 my $template = Template->new( ENCODING => 'UTF-8' );
 
 my $vars;
 my $output;
 $template->process( 't/db_dependent/data/syspref.pref', $vars, \$output );
 
-use Data::Printer colored => 1; warn p $output;
-
-my $yaml = YAML::Syck::Load( $output );
+my $yaml = YAML::XS::Load( Encode::encode_utf8( $output ) );
 my $syspref_1 = $yaml->{Test}->{Testing}->[0];
 my $syspref_2 = $yaml->{Test}->{Testing}->[1];
 my $syspref_3 = $yaml->{Test}->{Testing}->[2];
@@ -27,8 +23,8 @@ is_deeply(
         "Do it",
         {
             choices => {
-                1  => "certainly",
-                '' => "I don't think so"
+                on  => "certainly",
+                off => "I don't think so"
             },
             pref => "syspref_1"
         }
@@ -54,7 +50,7 @@ is_deeply(
         "We love unicode",
         {
             choices => {
-                ''    => "Not really",
+                no  => "Not really",
                 '★' => "❤️"
             },
             pref => "syspref_3"