Created
April 8, 2012 15:03
-
-
Save ssoriche/2337755 to your computer and use it in GitHub Desktop.
Failing Hash Ref Tag Helper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Test::More tests => 72; | |
use Test::Mojo; | |
{ | |
package Foo; | |
use Mojo::Base 'Mojolicious'; | |
sub startup { | |
my $self = shift; | |
my $r = $self->routes; | |
$r->route('links')->via('GET','POST'); | |
} | |
1; | |
} | |
my $t = Test::Mojo->new('Foo'); | |
$t->get_ok('/links')->status_is(200)->content_is(<<EOF); | |
<a href="/path">Pa<th</a> | |
<a href="http://example.com/" title="Foo">Foo</a> | |
<a href="http://example.com/"><foo>Example</foo></a> | |
<a href="/links">Home</a> | |
<a href="/form/23" title="Foo">Foo</a> | |
EOF | |
__DATA__ | |
@@ links.html.ep | |
<%= link_to 'Pa<th' => '/path' %> | |
<%= link_to 'http://example.com/', title => 'Foo', sub { 'Foo' } %> | |
<%= link_to 'http://example.com/' => begin %><foo>Example</foo><% end %> | |
<%= link_to Home => 'links' %> | |
<%= link_to Foo => 'form', {test => 23}, title => 'Foo' %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment