Bug 16668: Fix t/Ris.t tests
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 7 Jun 2016 11:29:33 +0000 (12:29 +0100)
committerJulian Maurice <julian.maurice@biblibre.com>
Thu, 16 Jun 2016 08:58:50 +0000 (10:58 +0200)
Caused by bug 16442.
Now we need to mock the marcflavour pref

Test plan:
  prove t/Ris.t
should return green

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 023384811f54f18fbe585431c49b80cfc20e58dd)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit a1f1ea03177204af1cb5dde29b5f18f339402bdb)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

C4/Ris.pm
t/Ris.t

index 10c5cf0..b8c9c93 100644 (file)
--- a/C4/Ris.pm
+++ b/C4/Ris.pm
@@ -560,6 +560,7 @@ $clean_subtitle ||= q{};
        ## be written and designated. The field is free-form and resistant
        ## to all parsing efforts, so this information is lost on me
     }
+    return;
 }
 
 ##********************************************************************
@@ -592,6 +593,7 @@ sub print_stitle {
            }
        }
     }
+    return;
 }
 
 ##********************************************************************
diff --git a/t/Ris.t b/t/Ris.t
index 0840e2c..c11b1f5 100755 (executable)
--- a/t/Ris.t
+++ b/t/Ris.t
@@ -3,15 +3,15 @@
 # This Koha test module is a stub!  
 # Add more tests here!!!
 
-use strict;
-use warnings;
+use Modern::Perl;
 
+use t::lib::Mocks;
 use Test::More tests => 4;
 
 BEGIN {
-        use_ok('C4::Ris');
+    use_ok('C4::Ris');
 }
-
+t::lib::Mocks::mock_preference('marcflavour', 'MARC21');
 is(C4::Ris::print_typetag(),undef,'test printing typetag');
 
 is(C4::Ris::print_title(),undef, 'test printing title when print_title is nil');