Skip to content

Commit

Permalink
fix broken mock for DELETE requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Phillips committed Dec 3, 2012
1 parent 04454f3 commit af6312e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions t/04-client.t
Expand Up @@ -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; });
Expand All @@ -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');
Expand Down

0 comments on commit af6312e

Please sign in to comment.