expunge [ value => $value ] style in favour of scalarrefs
[scpubgit/DKit.git] / t / dot_ssh.t
index aac7c71..d55b5d5 100644 (file)
@@ -93,7 +93,7 @@ is(paths_for_simple([ is_directory => 'PS' ]), '.ssh');
 
 is(paths_for_simple([ is_file => 'PS' ]), '.ssh/authorized_keys');
 
-is(paths_for_simple([ mode => 'PS', [ value => '0755' ] ]), '.ssh');
+is(paths_for_simple([ mode => 'PS', \'0755' ]), '.ssh');
 
 $solver->add_rule(
   path_status_at => [ 'PS', 'P' ],
@@ -107,7 +107,7 @@ $solver->add_rule(
 
 throws_ok {
   $solver->query(
-    [ path_status_at => 'PS', [ value => '.ssh' ] ]
+    [ path_status_at => 'PS', \'.ssh' ]
   )->results
 } qr/ARGH/;
 
@@ -128,7 +128,7 @@ my @res;
 
 lives_ok {
   @res = $solver->query(
-    [ path_status_at => 'PS', [ value => '.ssh' ] ]
+    [ path_status_at => 'PS', \'.ssh' ]
   )->results
 };
 
@@ -168,18 +168,18 @@ sub paths_for {
 }
 
 is(
-  paths_for([ path_status => 'PS' ], [ path => 'PS', [ value => '.ssh' ] ]),
+  paths_for([ path_status => 'PS' ], [ path => 'PS', \'.ssh' ]),
   '',
   'no .ssh entry'
 );
 
-throws_ok { paths_for([ path_status_at => 'PS', [ value => '.ssh' ] ]) }
+throws_ok { paths_for([ path_status_at => 'PS', \'.ssh' ]) }
   qr/refused/;
 
 $solver->{observation_policy} = sub { 1 };
 
 is(
-  paths_for([ path_status_at => 'PS', [ value => '.ssh' ] ]),
+  paths_for([ path_status_at => 'PS', \'.ssh' ]),
   '.ssh',
   'observation'
 );
@@ -188,7 +188,7 @@ is($path_status{'.ssh'}, $ob_res{'.ssh'});
 
 delete $solver->{observation_policy};
 
-lives_ok { paths_for([ path_status_at => 'PS', [ value => '.ssh' ] ]) }
+lives_ok { paths_for([ path_status_at => 'PS', \'.ssh' ]) }
   'No observation required anymore';
 
 $path_status{'.ssh/authorized_keys'} = $protos{'.ssh/authorized_keys'};
@@ -217,7 +217,7 @@ $ob_res{'.ssh'} = $empty{'.ssh'};
 $solver->{observation_policy} = sub { 1 };
 
 sub dot_ssh_query {
-  $solver->query([ directory_at => 'PS' => [ value => '.ssh' ] ]);
+  $solver->query([ directory_at => 'PS' => \'.ssh' ]);
 }
 
 is_deeply(
@@ -225,7 +225,7 @@ is_deeply(
   []
 );
 
-#::Dwarn(paths_for([ directory_at => 'PS', [ value => '.ssh' ] ]));
+#::Dwarn(paths_for([ directory_at => 'PS', \'.ssh' ]));
 
 $solver->add_rule(@$_) for (
   [ is_directory => [ qw(PS) ],