|
Lines 19-25
Link Here
|
| 19 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
19 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
| 20 |
|
20 |
|
| 21 |
use Modern::Perl; |
21 |
use Modern::Perl; |
| 22 |
use Test::More tests => 9; |
22 |
use Test::More tests => 8; |
| 23 |
use C4::Context; |
23 |
use C4::Context; |
| 24 |
use Koha::Database; |
24 |
use Koha::Database; |
| 25 |
|
25 |
|
|
Lines 61-75
is(C4::Context->preference('testpreference'), 'def', 'caching preferences');
Link Here
|
| 61 |
C4::Context->clear_syspref_cache(); |
61 |
C4::Context->clear_syspref_cache(); |
| 62 |
is(C4::Context->preference('testpreference'), undef, 'clearing preference cache'); |
62 |
is(C4::Context->preference('testpreference'), undef, 'clearing preference cache'); |
| 63 |
|
63 |
|
| 64 |
sub select_systempreferences { |
|
|
| 65 |
my ($name) = @_; |
| 66 |
my $dbh = C4::Context->dbh; |
| 67 |
my $sth = $dbh->selectrow_hashref( "SELECT value, type FROM systempreferences WHERE variable = ?", {}, $name ); |
| 68 |
return $sth; |
| 69 |
} |
| 70 |
|
| 71 |
my $syspref = select_systempreferences('OPACHEADER'); |
| 72 |
is( $syspref->{'type'}, "Textarea", 'correct number of syspref found'); |
| 73 |
|
| 74 |
|
| 75 |
$dbh->rollback; |
64 |
$dbh->rollback; |
| 76 |
- |
|
|