diff options
author | franck cuny <franck@lumberjaph.net> | 2010-11-05 16:25:34 +0100 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2010-11-05 16:25:34 +0100 |
commit | 831c4e751538e2c1ea2d83cf85f0778d18176d9c (patch) | |
tree | 69470d8eac8ea6b580b368feec41db35bf9d322c | |
parent | remove two methods (diff) | |
download | net-http-spore-831c4e751538e2c1ea2d83cf85f0778d18176d9c.tar.gz |
mock call finalize
-rw-r--r-- | lib/Net/HTTP/Spore/Middleware/Mock.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Net/HTTP/Spore/Middleware/Mock.pm b/lib/Net/HTTP/Spore/Middleware/Mock.pm index 12568bf..d51ab5f 100644 --- a/lib/Net/HTTP/Spore/Middleware/Mock.pm +++ b/lib/Net/HTTP/Spore/Middleware/Mock.pm @@ -10,8 +10,9 @@ has tests => ( isa => 'HashRef', is => 'ro', required => 1 ); sub call { my ( $self, $req ) = @_; + my $finalized_request = $req->finalize; foreach my $r ( keys %{ $self->tests } ) { - next unless $r eq $req->path; + next unless $r eq $finalized_request->uri->path; my $res = $self->tests->{$r}->($req); return $res if defined $res; } |