Commit | Line | Data |
aa9e8261 |
1 | use strict; |
2 | use warnings; |
6e444c5c |
3 | use Test::More tests => 6; |
aa9e8261 |
4 | |
5 | use_ok('Catalyst::Response'); |
6 | |
7 | my $res = Catalyst::Response->new; |
8 | |
9 | # test aliasing of res->code for res->status |
10 | $res->code(500); |
11 | is($res->code, 500, 'code sets itself'); |
12 | is($res->status, 500, 'code sets status'); |
13 | $res->status(501); |
14 | is($res->code, 501, 'status sets code'); |
6e444c5c |
15 | is($res->body, '', "default response body ''"); |
16 | $res->body(undef); |
17 | is($res->body, '', "response body '' after assigned undef"); |
18 | |