Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
more node tests
  • Loading branch information
kraih committed Jan 19, 2014
1 parent 8e44b05 commit 6491250
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions t/mojo/dom.t
Expand Up @@ -159,10 +159,11 @@ is $dom->contents->first->value, ' before', 'right value';
is $dom->contents->[2]->node, 'pi', 'right node';
is $dom->contents->[2]->value, 'after', 'right value';
is $dom->contents->first->value(' again')->value, ' again', 'right value';
is "$dom", '<!DOCTYPE again><p><![CDATA[123]]><!-- 456 --></p><?after?>',
is $dom->contents->grep(sub { $_->node eq 'pi' })->remove->first->node,
'root', 'right node';
is "$dom", '<!DOCTYPE again><p><![CDATA[123]]><!-- 456 --></p>',
'right result';
$dom = Mojo::DOM->new('<script>la<la>la</script>');
is $dom->node, 'root', 'right node';
is $dom->at('script')->node, 'tag', 'right node';
is $dom->at('script')->contents->first->node, 'raw', 'right node';
is $dom->at('script')->contents->first->value, 'la<la>la', 'right value';
Expand Down

0 comments on commit 6491250

Please sign in to comment.