X-Git-Url: http://git.rot13.org/?p=perl-cwmp.git;a=blobdiff_plain;f=t%2F05-store.t;h=0cac16fc7e506d2b513505cb7b116434e13559c9;hp=1d061bc325700761a3c5daa3945ab1430b0192cf;hb=ab3c8b6b75a3c7fb9ddc5a0c474fb1aa7269bc83;hpb=129255e972e244dd52982926ed3c391a6c73ffc8 diff --git a/t/05-store.t b/t/05-store.t index 1d061bc..0cac16f 100755 --- a/t/05-store.t +++ b/t/05-store.t @@ -4,7 +4,7 @@ use warnings; my $debug = shift @ARGV; -use Test::More tests => 47; +use Test::More tests => 32; use Data::Dump qw/dump/; use Cwd qw/abs_path/; use lib 'lib'; @@ -13,7 +13,6 @@ use lib 'lib'; BEGIN { use_ok('CWMP::Store'); - use_ok('CWMP::Store::DBMDeep'); use_ok('CWMP::Store::YAML'); use_ok('CWMP::Store::JSON'); } @@ -62,14 +61,14 @@ sub test_store { is_deeply( $state, $store_state, 'state ID same as uid' ); - ok( $store->update_state( { + $state = { DeviceID => { SerialNumber => 123456, }, baz => 12345 - } ), 'update_state existing' ); + }; - $state->{baz} = 12345; + ok( $store->set_state( 123456, $state ), 'set_state' ); is_deeply( $store->get_state( 123456 ), $state, 'get_state' ); @@ -79,13 +78,10 @@ sub test_store { is_deeply( [ $store->all_uids ], [ 123456, 99999 ], 'all_uids' ); - undef $store; - } # now test all stores -test_store('DBMDeep'); test_store('YAML'); test_store('JSON');