[Patches] [PATCH] Bug 6132: Add unit test for system preferences
koha-patchbot at kohaaloha.com
koha-patchbot at kohaaloha.com
Tue Jan 3 19:20:04 NZDT 2012
From: Julian Maurice <julian.maurice at biblibre.com>
Date: Mon, 2 Jan 2012 10:49:28 +0100
Subject: [PATCH] Bug 6132: Add unit test for system preferences
Signed-off-by: Chris Cormack <chris at bigballofwax.co.nz>
---
t/db_dependent/sysprefs.t | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
create mode 100755 t/db_dependent/sysprefs.t
diff --git a/t/db_dependent/sysprefs.t b/t/db_dependent/sysprefs.t
new file mode 100755
index 0000000..f457391
--- /dev/null
+++ b/t/db_dependent/sysprefs.t
@@ -0,0 +1,14 @@
+#!/usr/bin/perl
+
+use Modern::Perl;
+use Test::More tests => 2;
+use C4::Context;
+
+my $opacheader = C4::Context->preference('opacheader');
+my $newopacheader = "newopacheader";
+
+C4::Context->set_preference('OPACHEADER', $newopacheader);
+ok(C4::Context->preference('opacheader') eq $newopacheader);
+
+C4::Context->set_preference('opacheader', $opacheader);
+ok(C4::Context->preference('OPACHEADER') eq $opacheader);
--
1.7.5.4
More information about the Patches
mailing list