54ead9d8d95c127c979569d8d753b5ed530576aa
[catagits/Catalyst-Runtime.git] / t / 14connection.t
1 package TestApp;
2
3 use Catalyst qw[-Engine=Test];
4
5 __PACKAGE__->action(
6     hostname => sub {
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
16 package main;
17
18 use Test::More tests => 2;
19 use Catalyst::Test 'TestApp';
20
21 ok( get('/hostname') eq 'localhost' );
22 ok( get('/address')  eq '127.0.0.1' );