From 54c4c73e479f374dad7b5db6dc23272960aa2a01 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Sun, 3 Aug 2014 16:41:18 -0300 Subject: [PATCH] Bug 12554: (tests followup) need to mock GetCurrency Signed-off-by: Tomas Cohen Arazi --- t/db_dependent/Biblio.t | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/t/db_dependent/Biblio.t b/t/db_dependent/Biblio.t index 137946e86f..901f76134d 100755 --- a/t/db_dependent/Biblio.t +++ b/t/db_dependent/Biblio.t @@ -37,6 +37,12 @@ my $context = new Test::MockModule('C4::Context'); mock_marcfromkohafield(); +my $currency = new Test::MockModule('C4::Budgets'); +$currency->mock( 'GetCurrency', sub { + return { symbol => '$', isocode => 'USD', + currency => 'USD', active => 1 }; +}); + sub run_tests { # Undef C4::Biblio::inverted_field_map to avoid problems introduced @@ -178,6 +184,8 @@ sub run_tests { is( $isbns->[$i], $more_isbns[$i], "(GetMarcISBN) Corretly retrieves ISBN #". ($i + 1)); } + + is( GetMarcPrice( $record_for_isbn, $marcflavour ), 100, "GetMarcPrice returns the correct value"); } -- 2.39.2