X-Git-Url: http://git.rot13.org/?p=perl-cwmp.git;a=blobdiff_plain;f=t%2F05-store.t;h=0cac16fc7e506d2b513505cb7b116434e13559c9;hp=0e885ad98e694a21155eda5b6f33f07259e47da6;hb=c3e3a10c037b3b0fb7d531d226464e19c9d9e18f;hpb=0096fa526f2bff8da10e3c81d14daa03efc6aef2 diff --git a/t/05-store.t b/t/05-store.t index 0e885ad..0cac16f 100755 --- a/t/05-store.t +++ b/t/05-store.t @@ -9,12 +9,12 @@ use Data::Dump qw/dump/; use Cwd qw/abs_path/; use lib 'lib'; -use Devel::LeakTrace::Fast; +#use Devel::LeakTrace::Fast; BEGIN { use_ok('CWMP::Store'); - use_ok('CWMP::Store::DBMDeep'); use_ok('CWMP::Store::YAML'); + use_ok('CWMP::Store::JSON'); } ok(my $abs_path = abs_path($0), "abs_path"); @@ -61,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' ); @@ -78,12 +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');