X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-HTTP-AnyUA;a=blobdiff_plain;f=t%2F40-middleware-runtime.t;fp=t%2F40-middleware-runtime.t;h=5597fda9ed1f4ec46425dcd2f223c905d8d9780d;hp=0000000000000000000000000000000000000000;hb=cde5368e2d23e07a80fa67f670afcb99093d0f77;hpb=8063c6418b41f6e09eb3783f27253502a311f5d8 diff --git a/t/40-middleware-runtime.t b/t/40-middleware-runtime.t new file mode 100644 index 0000000..5597fda --- /dev/null +++ b/t/40-middleware-runtime.t @@ -0,0 +1,23 @@ +#!perl + +use warnings; +use strict; + +use lib 't/lib'; + +use HTTP::AnyUA; +use Test::More tests => 1; + +HTTP::AnyUA->register_backend(Mock => '+MockBackend'); + +my $any_ua = HTTP::AnyUA->new(ua => 'Mock'); +my $backend = $any_ua->backend; + +$any_ua->apply_middleware('Runtime'); + +my $url = 'http://acme.tld/'; + +my $resp = $any_ua->get($url); +note explain $resp; +isnt $resp->{runtime}, undef, 'runtime is defined'; +