[Catalyst-commits] r7980 - in Catalyst-Runtime/5.80/trunk: . t
groditi at dev.catalyst.perl.org
groditi at dev.catalyst.perl.org
Mon Jun 23 22:18:56 BST 2008
Author: groditi
Date: 2008-06-23 22:18:56 +0100 (Mon, 23 Jun 2008)
New Revision: 7980
Modified:
Catalyst-Runtime/5.80/trunk/
Catalyst-Runtime/5.80/trunk/t/live_engine_request_uploads.t
Catalyst-Runtime/5.80/trunk/t/live_engine_request_uri.t
Log:
r17795 at martha (orig r7726): konobi | 2008-05-08 15:10:48 -0400
Fix tests that were testing object internals instead of accessors.
Property changes on: Catalyst-Runtime/5.80/trunk
___________________________________________________________________
Name: svk:merge
- 1c72fc7c-9ce4-42af-bf25-3bfe470ff1e8:/local/Catalyst/trunk/Catalyst-Runtime:9763
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/trunk:7576
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/moose:7725
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-ChildOf:4443
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-Runtime-jrockway:5857
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-component-setup:4320
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-docs:4325
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/current/Catalyst-Runtime:5142
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst:4483
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst-Runtime:6165
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/Catalyst-Runtime:8339
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/Catalyst-Runtime-jrockway:8342
e56d974f-7718-0410-8b1c-b347a71765b2:/local/Catalyst-Runtime:6511
e56d974f-7718-0410-8b1c-b347a71765b2:/local/Catalyst-Runtime-current:10442
+ 1c72fc7c-9ce4-42af-bf25-3bfe470ff1e8:/local/Catalyst/trunk/Catalyst-Runtime:9763
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.70/trunk:7576
4ad37cd2-5fec-0310-835f-b3785c72a374:/Catalyst-Runtime/5.80/branches/moose:7726
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-ChildOf:4443
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-Runtime-jrockway:5857
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-component-setup:4320
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-docs:4325
4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/current/Catalyst-Runtime:5142
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst:4483
4ad37cd2-5fec-0310-835f-b3785c72a374:/trunk/Catalyst-Runtime:6165
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/Catalyst-Runtime:8339
d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst/Catalyst-Runtime-jrockway:8342
e56d974f-7718-0410-8b1c-b347a71765b2:/local/Catalyst-Runtime:6511
e56d974f-7718-0410-8b1c-b347a71765b2:/local/Catalyst-Runtime-current:10442
Modified: Catalyst-Runtime/5.80/trunk/t/live_engine_request_uploads.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/live_engine_request_uploads.t 2008-06-23 21:18:49 UTC (rev 7979)
+++ Catalyst-Runtime/5.80/trunk/t/live_engine_request_uploads.t 2008-06-23 21:18:56 UTC (rev 7980)
@@ -60,7 +60,7 @@
my $disposition = $part->header('Content-Disposition');
my %parameters = @{ ( split_header_words($disposition) )[0] };
- my $upload = $creq->{uploads}->{ $parameters{filename} };
+ my $upload = $creq->uploads->{ $parameters{filename} };
isa_ok( $upload, 'Catalyst::Request::Upload' );
@@ -68,7 +68,7 @@
is( $upload->size, length( $part->content ), 'Upload Content-Length' );
# make sure upload is accessible via legacy params->{$file}
- is( $creq->{parameters}->{ $upload->filename },
+ is( $creq->parameters->{ $upload->filename },
$upload->filename, 'legacy param method ok' );
ok( !-e $upload->tempname, 'Upload temp file was deleted' );
@@ -120,7 +120,7 @@
my $disposition = $part->header('Content-Disposition');
my %parameters = @{ ( split_header_words($disposition) )[0] };
- my $upload = $creq->{uploads}->{ $parameters{name} }->[$i];
+ my $upload = $creq->uploads->{ $parameters{name} }->[$i];
isa_ok( $upload, 'Catalyst::Request::Upload' );
is( $upload->type, $part->content_type, 'Upload Content-Type' );
@@ -220,7 +220,7 @@
is( $creq->content_length, $request->content_length,
'Catalyst::Request Content-Length' );
- my $param = $creq->{parameters}->{testfile};
+ my $param = $creq->parameters->{testfile};
ok( @$param == 2, '2 values' );
is( $param->[0], 'textfield value', 'correct value' );
@@ -233,7 +233,7 @@
next unless exists $parameters{filename};
- my $upload = $creq->{uploads}->{ $parameters{name} };
+ my $upload = $creq->uploads->{ $parameters{name} };
isa_ok( $upload, 'Catalyst::Request::Upload' );
Modified: Catalyst-Runtime/5.80/trunk/t/live_engine_request_uri.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/live_engine_request_uri.t 2008-06-23 21:18:49 UTC (rev 7979)
+++ Catalyst-Runtime/5.80/trunk/t/live_engine_request_uri.t 2008-06-23 21:18:56 UTC (rev 7980)
@@ -62,8 +62,8 @@
ok( my $response = request('http://localhost/engine/request/uri?a=1;a=2;b=3'), 'Request' );
ok( $response->is_success, 'Response Successful 2xx' );
ok( eval '$creq = ' . $response->content, 'Unserialize Catalyst::Request' );
- is( $creq->{uri}->query, 'a=1;a=2;b=3', 'Query string ok' );
- is_deeply( $creq->{parameters}, $parameters, 'Parameters ok' );
+ is( $creq->uri->query, 'a=1;a=2;b=3', 'Query string ok' );
+ is_deeply( $creq->parameters, $parameters, 'Parameters ok' );
}
# test that query params are unescaped properly
@@ -71,8 +71,8 @@
ok( my $response = request('http://localhost/engine/request/uri?text=Catalyst%20Rocks'), 'Request' );
ok( $response->is_success, 'Response Successful 2xx' );
ok( eval '$creq = ' . $response->content, 'Unserialize Catalyst::Request' );
- is( $creq->{uri}->query, 'text=Catalyst%20Rocks', 'Query string ok' );
- is( $creq->{parameters}->{text}, 'Catalyst Rocks', 'Unescaped param ok' );
+ is( $creq->uri->query, 'text=Catalyst%20Rocks', 'Query string ok' );
+ is( $creq->parameters->{text}, 'Catalyst Rocks', 'Unescaped param ok' );
}
# test that uri_with adds params
More information about the Catalyst-commits
mailing list