Lines 19-26
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 => 8; |
22 |
use Test::More tests => 9; |
23 |
use C4::Context; |
23 |
use C4::Context; |
|
|
24 |
use Koha::Database; |
24 |
|
25 |
|
25 |
# Start transaction |
26 |
# Start transaction |
26 |
my $dbh = C4::Context->dbh; |
27 |
my $dbh = C4::Context->dbh; |
Lines 60-63
is(C4::Context->preference('testpreference'), 'def', 'caching preferences');
Link Here
|
60 |
C4::Context->clear_syspref_cache(); |
61 |
C4::Context->clear_syspref_cache(); |
61 |
is(C4::Context->preference('testpreference'), undef, 'clearing preference cache'); |
62 |
is(C4::Context->preference('testpreference'), undef, 'clearing preference cache'); |
62 |
|
63 |
|
|
|
64 |
sub select_systempreferences { |
65 |
my ($name) = @_; |
66 |
my $schema = Koha::Database->new()->schema(); |
67 |
my $syspref = $schema->resultset('Systempreference')->search( |
68 |
{variable => $name} |
69 |
); |
70 |
return $syspref; |
71 |
} |
72 |
|
73 |
|
74 |
my $syspref = select_systempreferences('OPACHEADER'); |
75 |
is( $syspref, 1, 'correct number of syspref found'); |
76 |
|
77 |
|
63 |
$dbh->rollback; |
78 |
$dbh->rollback; |
64 |
- |
|
|