Blame t/request_type_with_data.t
|
Packit |
a09cf7 |
use strict;
|
|
Packit |
a09cf7 |
use warnings;
|
|
Packit |
a09cf7 |
|
|
Packit |
a09cf7 |
use Test::More 0.88;
|
|
Packit |
a09cf7 |
use HTTP::Request::Common;
|
|
Packit |
a09cf7 |
|
|
Packit |
a09cf7 |
# I'd use Test::Warnings here, but let's respect our downstream consumers and
|
|
Packit |
a09cf7 |
# not force that prereq on them
|
|
Packit |
a09cf7 |
my @warnings;
|
|
Packit |
a09cf7 |
$SIG{__WARN__} = sub { push @warnings, grep { length } @_ };
|
|
Packit |
a09cf7 |
|
|
Packit |
a09cf7 |
my $request = HTTP::Request::Common::request_type_with_data(
|
|
Packit |
a09cf7 |
'POST' => 'https://localhost/',
|
|
Packit |
a09cf7 |
'content_type' => 'multipart/form-data; boundary=----1234',
|
|
Packit |
a09cf7 |
'content' => [ a => 1, b => undef ],
|
|
Packit |
a09cf7 |
);
|
|
Packit |
a09cf7 |
|
|
Packit |
a09cf7 |
isa_ok($request, 'HTTP::Request');
|
|
Packit |
a09cf7 |
is(scalar(@warnings), 0, 'no warnings')
|
|
Packit |
a09cf7 |
or diag('got warnings: ', explain(\@warnings));
|
|
Packit |
a09cf7 |
|
|
Packit |
a09cf7 |
done_testing;
|