Show
Ignore:
Timestamp:
05/04/08 19:02:44 (6 years ago)
Author:
tokuhirom
Message:

added test case for prepare body.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/HTTP-Engine/branches/moose/t/10_request_builder.t

    r11085 r11088  
    2222    my $c = HTTP::Engine::Context->new(env => $block->env); 
    2323 
    24     tie *STDIN, 'IO::Scalar', $block->input; 
     24    tie *STDIN, 'IO::Scalar', \( $block->body ); 
    2525    $builder->prepare($c); 
    2626    untie *STDIN; 
     
    4343is $c->req->address, '127.0.0.1'; 
    4444 
     45=== 
     46--- env 
     47REMOTE_ADDR:    127.0.0.1 
     48SERVER_PORT:    80 
     49QUERY_STRING:   '' 
     50REQUEST_METHOD: 'POST' 
     51HTTP_HOST: localhost 
     52HTTP_CONTENT_LENGTH: 7 
     53HTTP_CONTENT_TYPE: application/x-www-form-urlencoded 
     54--- body: a=b&c=d 
     55--- test 
     56is_deeply $c->req->body_params, {a => 'b', c => 'd'}; 
     57