From af6312e3b02e5a9493add6986d8930dc2e14fa03 Mon Sep 17 00:00:00 2001 From: Brian Phillips Date: Mon, 3 Dec 2012 09:39:07 -0600 Subject: [PATCH] fix broken mock for DELETE requests --- t/04-client.t | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/04-client.t b/t/04-client.t index e59f9ce..5b67a2d 100644 --- a/t/04-client.t +++ b/t/04-client.t @@ -7,7 +7,7 @@ use App::Presto::Client; my $config = Test::MockObject->new; $config->set_always( endpoint => 'http://my-server.com'); my $rest_client = Test::MockObject->new; -$rest_client->set_true('GET','DELETE','PUT','POST','HEAD'); +$rest_client->set_true('GET','DELETE','PUT','POST','HEAD','request'); my %headers; $rest_client->mock('addHeader', sub { shift; my($k,$v) = @_; $headers{$k} = $v; }); @@ -27,8 +27,8 @@ $client->GET('/foo'); $client->DELETE('http://another-server.com/blah'); { my ( $m, $args ) = $rest_client->next_call; - is $m, 'DELETE', 'rest_client DELETE'; - is $args->[1], 'http://another-server.com/blah', 'allows URI override'; + is $m, 'request', 'rest_client request'; + is $args->[2], 'http://another-server.com/blah', 'allows URI override'; } $client->PUT('/bar', 'foobar');