Skip to content

Commit

Permalink
test those new error messages too
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Aug 27, 2016
1 parent 1e0f1a3 commit 54f53cf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions t/mojolicious/app.t
Expand Up @@ -16,6 +16,7 @@ use Mojo::Asset::File;
use Mojo::Date;
use Mojo::IOLoop;
use Mojolicious;
use Mojolicious::Controller;
use Test::Mojo;

# Missing config file
Expand Down Expand Up @@ -598,6 +599,12 @@ $t->get_ok('/foo/session')->status_is(200)
$t->get_ok('/rss.xml')->status_is(200)->content_type_is('application/rss+xml')
->content_like(qr!<\?xml version="1.0" encoding="UTF-8"\?><rss />!);

# Connection already closed
eval { Mojolicious::Controller->new->req };
like $@, qr/Connection already closed/, 'right error';
eval { Mojolicious::Controller->new->res };
like $@, qr/Connection already closed/, 'right error';

# Abstract methods
eval { Mojolicious::Plugin->register };
like $@, qr/Method "register" not implemented by subclass/, 'right error';
Expand Down

0 comments on commit 54f53cf

Please sign in to comment.