Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
better test for embedded SVG
  • Loading branch information
kraih committed Mar 11, 2014
1 parent 85e8014 commit 6c13b15
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions t/mojo/dom.t
Expand Up @@ -2324,9 +2324,10 @@ is $dom->parse('<?0?>'), '<?0?>', 'successful roundtrip';
$dom = Mojo::DOM->new('<div /><div><pre />test</div>');
is $dom->at('div > div > pre')->text, 'test', 'right text';
is "$dom", '<div><div><pre>test</pre></div></div>', 'right result';
$dom = Mojo::DOM->new('<p /><svg><circle /></svg>');
is $dom->at('p > svg')->contents->first->type, 'circle', 'right type';
is "$dom", '<p><svg><circle></circle></svg></p>', 'right result';
$dom = Mojo::DOM->new('<p /><svg><circle /><circle /></svg>');
is $dom->find('p > svg > circle')->size, 2, 'two circles';
is "$dom", '<p><svg><circle></circle><circle></circle></svg></p>',
'right result';

# Comments
$dom = Mojo::DOM->new(<<EOF);
Expand Down

0 comments on commit 6c13b15

Please sign in to comment.