merge helpers
[catagits/HTML-Zoom.git] / t / actions.t
index 7647fd7..1b8b1fb 100644 (file)
@@ -58,9 +58,9 @@ is(
 ($expect = $tmpl) =~ s/name="cow" class="main"/name="bar" class="foo"/;
 
 is(
-  run_for { $_->set_attribute({ 'class' => 'foo', 'name' => 'bar'}) },
+  run_for { $_->set_attr({ 'class' => 'foo', 'name' => 'bar'}) },
   $expect,
-  'set attributes using hashref form'
+  'set attributes using hashref form (shorthand)'
 );
 
 ($expect = $tmpl) =~ s/class="main"/class="main" foo="bar"/;
@@ -117,6 +117,14 @@ is(
   'remove attribute on non existing attribute'
 );
 
+($expect = $tmpl) =~ s/class="main"/class=""/;
+
+is(
+  run_for { $_->remove_from_attribute({ class => 'main' }) },
+  $expect,
+  'remove name from attribute'
+);
+
 ($expect = $tmpl) =~ s/ class="main"//;
 
 is(