Debian Codegraph @

t/request_type_with_data.t

raw
1 use strict;
2 use warnings;
3
4 use Test::More 0.88;
5 use HTTP::Request::Common;
6
7 # I'd use Test::Warnings here, but let's respect our downstream consumers and
8 # not force that prereq on them
9 my @warnings;
10 $SIG{__WARN__} = sub { push @warnings, grep { length } @_ };
11
12 my $request = HTTP::Request::Common::request_type_with_data(
13 'POST' => 'https://localhost/',
14 'content_type' => 'multipart/form-data; boundary=----1234',
15 'content' => [ a => 1, b => undef ],
16 );
17
18 isa_ok($request, 'HTTP::Request');
19 is(scalar(@warnings), 0, 'no warnings')
20 or diag('got warnings: ', explain(\@warnings));
21
22 done_testing;