i want some kick ass tests for this :)
[catagits/Catalyst-Runtime.git] / t / 15connection.t
CommitLineData
75c0bfcf 1package TestApp;
2
e05c5e3c 3use Catalyst qw[-Engine=Test];
75c0bfcf 4
a8ed7612 5sub hostname : Global {
6 my ( $self, $c ) = @_;
7 $c->res->output( $c->req->hostname );
8}
9sub address : Global {
10 my ( $self, $c ) = @_;
11 $c->res->output( $c->req->address );
12}
75c0bfcf 13
9113e270 14__PACKAGE__->setup;
15
75c0bfcf 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' );