From 779defc5971ab93cc99877c01dc4c26b69ec3995 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Wed, 30 Jul 2014 14:45:04 +0200 Subject: [PATCH] Bug 12398: Use mocks to make the test "database independent" --- t/Auth_with_cas.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/Auth_with_cas.t b/t/Auth_with_cas.t index 0b4a692..449fc1f 100755 --- a/t/Auth_with_cas.t +++ b/t/Auth_with_cas.t @@ -5,8 +5,11 @@ use Test::More tests => 1; use CGI; use C4::Auth_with_cas; +use t::lib::Mocks; + +my $opac_base_url = 'http://opacbaseurl'; +t::lib::Mocks::mock_preference('OPACBaseURL', $opac_base_url); -my $opac_base_url = C4::Context->preference('OpacBaseURL'); my $query_string = 'ticket=foo&bar=baz'; $ENV{QUERY_STRING} = $query_string; -- 1.7.10.4