summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2012-07-20 03:40:00 -0500
committerJesse Luehrs <doy@tozt.net>2012-07-20 03:43:27 -0500
commit69b58eba5bc8a01e27c74d6d2346738fdf9f8eb5 (patch)
tree6b1b9ed4364259acab91e54194beb8db54ade5ab /t
parentd5eab12edd13a722b557dcaf4fc5866a12d736d6 (diff)
downloadweb-request-69b58eba5bc8a01e27c74d6d2346738fdf9f8eb5.tar.gz
web-request-69b58eba5bc8a01e27c74d6d2346738fdf9f8eb5.zip
rename ->body to ->content on ::Response
Diffstat (limited to 't')
-rw-r--r--t/path_info.t2
-rw-r--r--t/path_info_escaped.t2
-rw-r--r--t/response-body.t2
-rw-r--r--t/response-compatible.t10
-rw-r--r--t/response.t6
5 files changed, 11 insertions, 11 deletions
diff --git a/t/path_info.t b/t/path_info.t
index bab50b9..d5cbbcc 100644
--- a/t/path_info.t
+++ b/t/path_info.t
@@ -12,7 +12,7 @@ my $path_app = sub {
my $req = Web::Request->new_from_env(shift);
my $res = $req->new_response(status => 200);
$res->content_type('text/plain');
- $res->body($req->path_info);
+ $res->content($req->path_info);
return $res->finalize;
};
diff --git a/t/path_info_escaped.t b/t/path_info_escaped.t
index 28e712c..3bd4f62 100644
--- a/t/path_info_escaped.t
+++ b/t/path_info_escaped.t
@@ -12,7 +12,7 @@ my $path_app = sub {
my $req = Web::Request->new_from_env(shift);
my $res = $req->new_response(status => 200);
$res->content_type('text/plain');
- $res->body('my ' . Dumper([ $req->uri, $req->parameters ]));
+ $res->content('my ' . Dumper([ $req->uri, $req->parameters ]));
return $res->finalize;
};
diff --git a/t/response-body.t b/t/response-body.t
index 39e2e03..80056fe 100644
--- a/t/response-body.t
+++ b/t/response-body.t
@@ -10,7 +10,7 @@ use Web::Response;
sub r($) {
my $res = Web::Response->new(status => 200);
- $res->body(@_);
+ $res->content(@_);
return $res->finalize->[2];
}
diff --git a/t/response-compatible.t b/t/response-compatible.t
index 9fa8e54..daf2c54 100644
--- a/t/response-compatible.t
+++ b/t/response-compatible.t
@@ -9,7 +9,7 @@ use Web::Response;
my $res = Web::Response->new;
$res->status(200);
$res->header("Foo:Bar" => "baz");
- $res->body("Hello");
+ $res->content("Hello");
is_deeply $res->finalize, [ 200, [ 'Foo:Bar' => 'baz' ], ["Hello"] ];
}
@@ -19,7 +19,7 @@ use Web::Response;
$res->status(200);
$res->header("Foo\000Bar" => "baz");
$res->header("Qux\177Quux" => "42");
- $res->body("Hello");
+ $res->content("Hello");
is_deeply $res->finalize, [ 200, [ "Foo\000Bar" => 'baz', "Qux\177Quux" => '42' ], ["Hello"] ];
}
@@ -29,7 +29,7 @@ use Web::Response;
$res->status(200);
$res->header("X-LWS-I" => "Bar\r\n true");
$res->header("X-LWS-II" => "Bar\r\n\t\ttrue");
- $res->body("Hello");
+ $res->content("Hello");
is_deeply $res->finalize,
[
@@ -43,7 +43,7 @@ use Web::Response;
my $res = Web::Response->new;
$res->status(200);
$res->header("X-CR-LF" => "Foo\nBar\rBaz");
- $res->body("Hello");
+ $res->content("Hello");
is_deeply $res->finalize, [ 200, [ 'X-CR-LF' => 'FooBarBaz' ], ["Hello"] ];
}
@@ -52,7 +52,7 @@ use Web::Response;
my $res = Web::Response->new;
$res->status(200);
$res->header("X-CR-LF" => "Foo\nBar\rBaz");
- $res->body("Hello");
+ $res->content("Hello");
is_deeply $res->finalize, [ 200, [ 'X-CR-LF' => 'FooBarBaz' ], ["Hello"] ];
}
diff --git a/t/response.t b/t/response.t
index a189c4d..eedf540 100644
--- a/t/response.t
+++ b/t/response.t
@@ -16,8 +16,8 @@ sub res {
is_deeply(
res(
- status => 200,
- body => 'hello',
+ status => 200,
+ content => 'hello',
),
[ 200, +[], [ 'hello' ] ]
);
@@ -38,7 +38,7 @@ is_deeply(
path => '/',
},
},
- body => 'hello',
+ content => 'hello',
),
[
200,