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:
Colin Kuskie 2010-05-02 00:27:32 -07:00
parent dbca5b31d9
commit 4a9a46f328
2 changed files with 5 additions and 1 deletions

View file

@ -2,6 +2,7 @@ package WebGUI::Cache::CHI;
use strict;
use base 'WebGUI::Cache';
use File::Temp qw/tempdir/;
use CHI;
=head1 NAME

View file

@ -34,6 +34,10 @@ plan tests => 3; # Increment this number for each test you create
# put your tests here
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 $testValue = "a rock that has no earthly business in that field";
@ -43,5 +47,4 @@ is($cache->get, $testValue, "set/get works");
$cache->delete;
is($cache->get, undef, "delete works");
#vim:ft=perl