Skip to content

Commit

Permalink
Test null to remove an attribute.
Browse files Browse the repository at this point in the history
Closes #115.
  • Loading branch information
flatheadmill committed Jun 25, 2013
1 parent 1fb9ee7 commit ddec258
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions t/directives/attribute.t.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ require('./proof')(2, function (step, context, fixture, ok, compare) {

step(function () {

context.generate('fixtures/attribute.stencil', { src: "world.png", alt: "Hello, World!" }, step());
context.generate('fixtures/attribute.stencil', { target: null, src: "world.png", alt: "Hello, World!" }, step());
fixture('fixtures/attribute-generate.xml', step());
fixture('fixtures/attribute-regenerate.xml', step());

Expand All @@ -14,7 +14,7 @@ require('./proof')(2, function (step, context, fixture, ok, compare) {
step(function () {

ok(compare(actual.document, generate), 'generate');
context.regenerate(actual, { src: "nurse.png", alt: "Hello, Nurse!" }, step());
context.regenerate(actual, { target: "_self", src: "nurse.png", alt: "Hello, Nurse!" }, step());

}, function (actual) {

Expand Down
2 changes: 1 addition & 1 deletion t/directives/fixtures/attribute-regenerate.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<html>
<body>
<a href="nurse.png"><img src="nurse.png" alt="Hello, Nurse!"></a>
<a href="nurse.png" target="_self"><img src="nurse.png" alt="Hello, Nurse!"></a>
</body>
</html>
2 changes: 1 addition & 1 deletion t/directives/fixtures/attribute.stencil
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<html xmlns:s="stencil">
<body>
<a s:href="src"><img s:src="src" s:alt="alt"/></a>
<a s:target="target" s:href="src"><img s:src="src" s:alt="alt"/></a>
</body>
</html>

0 comments on commit ddec258

Please sign in to comment.