Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
slightly more interesting test examples
  • Loading branch information
kraih committed Mar 31, 2012
1 parent 9b69e7d commit 759f012
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/Mojo/DOM/HTML.pm
Expand Up @@ -85,8 +85,7 @@ sub parse {
my ($self, $html) = @_;

# Decode
my $charset = $self->charset;
$html = decode $charset, $html if $charset;
if (my $charset = $self->charset) { $html = decode $charset, $html }

# Tokenize
my $tree = ['root'];
Expand All @@ -105,9 +104,7 @@ sub parse {
if ($doctype) { $self->_doctype($doctype, \$current) }

# Comment
elsif ($comment) {
$self->_comment($comment, \$current);
}
elsif ($comment) { $self->_comment($comment, \$current) }

# CDATA
elsif ($cdata) { $self->_cdata($cdata, \$current) }
Expand Down
2 changes: 2 additions & 0 deletions lib/Test/Mojo.pm
Expand Up @@ -415,6 +415,7 @@ Current transaction, usually a L<Mojo::Transaction::HTTP> object.
# More specific tests
is $t->tx->res->json->{foo}, 'bar', 'right value';
ok $t->tx->res->is_multipart, 'multipart content';
=head2 C<ua>
Expand Down Expand Up @@ -454,6 +455,7 @@ Alias for L<Mojo::UserAgent/"app">.
# Test application directly
is $t->app->defaults->{foo}, 'bar', 'right value';
ok $t->app->routes->find('echo')->is_websocket, 'WebSocket route';
=head2 C<content_is>
Expand Down

0 comments on commit 759f012

Please sign in to comment.