Add missing module to Cache::CHI. Fix tests to add a cache config if the current config file does not have one.
This commit is contained in:
parent
dbca5b31d9
commit
4a9a46f328
2 changed files with 5 additions and 1 deletions
|
|
@ -2,6 +2,7 @@ package WebGUI::Cache::CHI;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use base 'WebGUI::Cache';
|
use base 'WebGUI::Cache';
|
||||||
|
use File::Temp qw/tempdir/;
|
||||||
use CHI;
|
use CHI;
|
||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,10 @@ plan tests => 3; # Increment this number for each test you create
|
||||||
# put your tests here
|
# put your tests here
|
||||||
|
|
||||||
use_ok( 'WebGUI::Cache::CHI' );
|
use_ok( 'WebGUI::Cache::CHI' );
|
||||||
|
WebGUI::Test->originalConfig('cacheType');
|
||||||
|
WebGUI::Test->originalConfig('cache');
|
||||||
|
$session->config->set('cacheType', 'WebGUI::Cache::CHI');
|
||||||
|
$session->config->set('cache', { driver => 'FastMmap', });
|
||||||
|
|
||||||
my $cache = WebGUI::Cache::CHI->new($session, "this", "that");
|
my $cache = WebGUI::Cache::CHI->new($session, "this", "that");
|
||||||
my $testValue = "a rock that has no earthly business in that field";
|
my $testValue = "a rock that has no earthly business in that field";
|
||||||
|
|
@ -43,5 +47,4 @@ is($cache->get, $testValue, "set/get works");
|
||||||
$cache->delete;
|
$cache->delete;
|
||||||
is($cache->get, undef, "delete works");
|
is($cache->get, undef, "delete works");
|
||||||
|
|
||||||
|
|
||||||
#vim:ft=perl
|
#vim:ft=perl
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue