Skip to content

Commit

Permalink
better tag helper tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Dec 7, 2011
1 parent aec7871 commit dc7fb29
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Changes
@@ -1,5 +1,8 @@
This file documents the revision history for Perl extension Mojolicious.

2.37 2011-12-07 00:00:00
- Improved tests.

2.36 2011-12-05 00:00:00
- Changed default heartbeat timeout of Hypnotoad from 5 to 10
seconds.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious.pm
Expand Up @@ -32,7 +32,7 @@ has static => sub { Mojolicious::Static->new };
has types => sub { Mojolicious::Types->new };

our $CODENAME = 'Leaf Fluttering In Wind';
our $VERSION = '2.36';
our $VERSION = '2.37';

# "These old doomsday devices are dangerously unstable.
# I'll rest easier not knowing where they are."
Expand Down
19 changes: 18 additions & 1 deletion t/mojolicious/tag_helper_lite_app.t
@@ -1,13 +1,15 @@
#!/usr/bin/env perl
use Mojo::Base -strict;

use utf8;

# Disable Bonjour, IPv6 and libev
BEGIN {
$ENV{MOJO_NO_BONJOUR} = $ENV{MOJO_NO_IPV6} = 1;
$ENV{MOJO_IOWATCHER} = 'Mojo::IOWatcher';
}

use Test::More tests => 51;
use Test::More tests => 54;

# "Hey! Bite my glorious golden ass!"
use Mojolicious::Lite;
Expand Down Expand Up @@ -43,6 +45,9 @@ get 'form/:test' => 'form';
# PUT /selection
put 'selection';

# GET /☃
get '/☃' => 'snowman';

my $t = Test::Mojo->new;

# GET /tags
Expand Down Expand Up @@ -296,6 +301,13 @@ $t->put_ok('/selection?foo=bar&a=e&foo=baz&bar=d')->status_is(200)
. '</form>'
. "\n");

# GET /☃
$t->get_ok('/☃')->status_is(200)->content_is(<<'EOF');
<form action="/%E2%98%83">
<input type="submit" value="☃" />
</form>
EOF

__DATA__
@@ tags.html.ep
<%= tag 'foo' %>
Expand Down Expand Up @@ -392,3 +404,8 @@ __DATA__
%= select_field bar => [['D' => 'd', disabled => 'disabled'], 'baz']
%= submit_button
%= end
@@ snowman.html.ep
%= form_for snowman => begin
%= submit_button '☃'
%= end

0 comments on commit dc7fb29

Please sign in to comment.