From fb7945159fc604698090d8b0d1a7267551ecd535 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Mon, 2 Jan 2012 10:49:28 +0100 Subject: [PATCH] Bug 6132: Add unit test for system preferences Signed-off-by: Chris Cormack --- 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