Skip to content

Commit

Permalink
test for adding HTML style attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 7, 2014
1 parent 14981d1 commit 7357d14
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions t/mojo/dom.t
Expand Up @@ -641,6 +641,8 @@ is_deeply \@numbers, [1, 1, 2, 2, 3, 3], 'right order';
$dom = Mojo::DOM->new->parse("<div test=23 id='a' \n class='x' foo=bar />");
is $dom->at('div.x')->attr('test'), 23, 'right attribute';
is $dom->at('[foo="bar"]')->attr('class'), 'x', 'right attribute';
is $dom->at('div')->attr(baz => undef)->root->to_string,
'<div baz class="x" foo="bar" id="a" test="23"></div>', 'right result';

# Markup characters in attribute values
$dom = Mojo::DOM->new->parse(
Expand Down

0 comments on commit 7357d14

Please sign in to comment.