a5117fd9fbeabf42608e4ca6401c6ea442663ff4
[catagits/Catalyst-Runtime.git] / t / 15connection.t
1 package TestApp;
2
3 use Catalyst qw[-Engine=Test];
4
5 sub hostname : Global {
6     my ( $self, $c ) = @_;
7     $c->res->output( $c->req->hostname );
8 }
9 sub address : Global {
10     my ( $self, $c ) = @_;
11     $c->res->output( $c->req->address );
12 }
13
14 __PACKAGE__->setup;
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' );