X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=t%2FPersistant.t;h=1edd008ed494e889b98796b1a3553d907f3ea5f1;hb=e46e9470a485b83d42b082e8185e0cc0dd0abd1f;hp=cb600a9dfc7bb1efc595f0b2fa22ae2fc0ef147c;hpb=86b980e3759bbc49a413172392cb9cf986d6d6b5;p=koha.git diff --git a/t/Persistant.t b/t/Persistant.t index cb600a9dfc..1edd008ed4 100755 --- a/t/Persistant.t +++ b/t/Persistant.t @@ -2,12 +2,25 @@ use strict; use warnings; -use Test::More tests => 2; +use Test::More tests => 10; use Data::Dump qw(dump); BEGIN { use_ok('Koha::Persistant'); } ok my $row = Koha::Persistant::authorised_value( category => 'WITHDROWN', 1 ), 'authorised_value'; +ok $row->{lib}, 'lib'; +ok $row->{lib_opac}, 'lib_opac'; diag dump $row; -diag dump $Koha::Persistant::stats; +foreach ( 1 .. 3 ) { + is_deeply Koha::Persistant::authorised_value( category => 'WITHDROWN', 1 ), $row, "authorised_value cached $_"; +} + +is_deeply my $stats = $Koha::Persistant::stats, { authorised_value => [3, 1] }, 'stats correct'; +diag dump $stats; + +ok my $_cache = $Koha::Persistant::_cache, '_cache'; +diag dump $_cache; + +ok my $_sql_cache = $Koha::Persistant::_sql_cache, '_sql_cache'; +diag dump $_sql_cache;