projects
/
koha.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a6793a
)
Bug 10380: (follow-up) remove inadvertant database dependency for t/DateUtils.t
author
Galen Charlton
<gmc@esilibrary.com>
Fri, 18 Oct 2013 04:27:42 +0000
(
04:27
+0000)
committer
Galen Charlton
<gmc@esilibrary.com>
Fri, 18 Oct 2013 04:27:42 +0000
(
04:27
+0000)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
t/DateUtils.t
patch
|
blob
|
history
diff --git
a/t/DateUtils.t
b/t/DateUtils.t
index
cdff2af
..
0f8f2b9
100755
(executable)
--- a/
t/DateUtils.t
+++ b/
t/DateUtils.t
@@
-6,6
+6,7
@@
use DateTime::TimeZone;
use C4::Context;
use Test::More tests => 31;
+use Test::MockModule;
BEGIN { use_ok('Koha::DateUtils'); }
@@
-25,6
+26,14
@@
$dt->set_minute(0);
my $date_string;
+my $module_context = new Test::MockModule('C4::Context');
+$module_context->mock(
+ 'preference',
+ sub {
+ return 'us';
+ }
+);
+
my $dateformat = C4::Context->preference('dateformat');
cmp_ok output_pref({ dt => $dt, dateformat => $dateformat }),
'eq',