9 use Test::More tests => 10;
11 HTTP::AnyUA->register_backend(Mock => '+MockBackend');
13 my $any_ua = HTTP::AnyUA->new(ua => 'Mock');
14 my $backend = $any_ua->backend;
16 my $url = 'http://acme.tld/';
18 for my $shortcut (qw{get head put post delete}) {
19 my $resp = $any_ua->$shortcut($url);
20 my $request = ($backend->requests)[-1];
21 is $request->[0], uc($shortcut), "$shortcut shortcut makes a request with the correct method";
22 is $request->[1], $url, "$shortcut shortcut makes a request with the correct URL";