merge helpers
Simon Elliott [Sat, 4 Jun 2011 11:43:45 +0000 (12:43 +0100)]
t/actions.t

index dbfda0b..7647fd7 100644 (file)
@@ -79,6 +79,22 @@ is(
   'add attribute on existing attribute'
 );
 
+($expect = $tmpl) =~ s/class="main"/class="main foo"/;
+
+is(
+  run_for { $_->add_class('foo') },
+  $expect,
+  'add attribute on existing attribute (shorthand)'
+);
+
+($expect = $tmpl) =~ s/class="main"/class="main" id="foo"/;
+
+is(
+  run_for { $_->set_id('foo') },
+  $expect,
+  'set_id (shorthand)'
+);
+
 ($expect = $tmpl) =~ s/class="main"/class="main" foo="bar"/;
 
 is(