added Test::Pod support
[catagits/Catalyst-Runtime.git] / t / 15connection.t
CommitLineData
75c0bfcf 1package TestApp;
2
e05c5e3c 3use Catalyst qw[-Engine=Test];
75c0bfcf 4
5__PACKAGE__->action(
c46396b1 6 hostname => sub {
75c0bfcf 7 my ( $self, $c ) = @_;
8 $c->res->output( $c->req->hostname );
9 },
10 address => sub {
11 my ( $self, $c ) = @_;
12 $c->res->output( $c->req->address );
13 }
14);
15
16package main;
17
18use Test::More tests => 2;
19use Catalyst::Test 'TestApp';
20
21ok( get('/hostname') eq 'localhost' );
22ok( get('/address') eq '127.0.0.1' );