re-enable all_parameteres collection of first connect
[perl-cwmp.git] / t / 05-store.t
index 746ad4c..0cac16f 100755 (executable)
@@ -9,10 +9,12 @@ use Data::Dump qw/dump/;
 use Cwd qw/abs_path/;
 use lib 'lib';
 
+#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");
@@ -59,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' );
 
@@ -80,6 +82,6 @@ sub test_store {
 
 # now test all stores
 
-test_store('DBMDeep');
 test_store('YAML');
+test_store('JSON');