Skip to content

Commit

Permalink
test variant in file
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 12, 2014
1 parent 17b3511 commit ecd39c9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions t/mojolicious/multipath_lite_app.t
Expand Up @@ -17,6 +17,8 @@ get '/twenty_three' => '23';

get '/fourty_two' => '42';

get '/fourty_two_again' => {template => '42', variant => 'test'};

get '/yada' => {template => 'foo/yada'};

my $t = Test::Mojo->new;
Expand All @@ -30,6 +32,11 @@ $t->get_ok('/fourty_two')->status_is(200)
->header_is(Server => 'Mojolicious (Perl)')
->content_is("The answer is 42.\n");

# "templates2" directory (variant)
$t->get_ok('/fourty_two_again')->status_is(200)
->header_is(Server => 'Mojolicious (Perl)')
->content_is("The answer is 43!\n");

# "public2" directory
$t->get_ok('/hello.txt')->status_is(200)
->header_is(Server => 'Mojolicious (Perl)')
Expand Down
1 change: 1 addition & 0 deletions t/mojolicious/templates2/42.html+test.ep
@@ -0,0 +1 @@
The answer is <%= 40 + 3 %>!

0 comments on commit ecd39c9

Please sign in to comment.