Skip to content

Commit

Permalink
better embedding test case
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Apr 18, 2012
1 parent be9521d commit 3d2e444
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions t/mojolicious/embedded_lite_app.t
Expand Up @@ -317,13 +317,13 @@ $t->get_ok('/♥/123/host' => {Host => 'www.foo-bar.de'})->status_is(200)
$t->get_ok('/♥/123/echo' => {Host => 'www.foo-bar.de'})->status_is(200)
->content_is('echo: works 3!');

# GET /♥/123/hello (full external application with a bit of everything)
$t->get_ok('/♥/123/hello' => {Host => 'www.foo-bar.de'})->status_is(200)
->content_is("Oneone\n");
# GET /♥/123/one (full external application with a bit of everything)
$t->get_ok('/♥/123/one' => {Host => 'www.foo-bar.de'})->status_is(200)
->content_is('One');

# GET /♥/123/hello/world (full external application with a bit of everything)
$t->get_ok('/♥/123/hello/world' => {Host => 'www.foo-bar.de'})
->status_is(200)->content_is("Two\n");
# GET /♥/123/one/two (full external application with a bit of everything)
$t->get_ok('/♥/123/one/two' => {Host => 'www.foo-bar.de'})->status_is(200)
->content_is('Two');

__DATA__
Expand Down
8 changes: 4 additions & 4 deletions t/mojolicious/external/myapp.pl
Expand Up @@ -53,11 +53,11 @@
$self->render(text => $self->url_for->base->host);
};

# GET /hello
get '/hello' => {inline => 'One<%= param "test" || "" %>', test => 'one'};
# GET /one
get '/one' => sub { shift->render_text('One') };

# GET /hello/world
get '/hello/world' => {inline => 'Two<%= param "test" || "" %>'};
# GET /one/two
get '/one/two' => {text => 'Two'};

app->start;
__DATA__
Expand Down

0 comments on commit 3d2e444

Please sign in to comment.