summaryrefslogtreecommitdiff
path: root/t/spore-request/exception.t
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-09-15 16:14:40 +0200
committerfranck cuny <franck@lumberjaph.net>2010-09-15 16:14:40 +0200
commit606b117f2c5246eafd5b2001fd211d79aba85447 (patch)
tree1fe59eafe8690d30404437376d429e813ace8a26 /t/spore-request/exception.t
parentadd a auth method (diff)
downloadnet-http-spore-606b117f2c5246eafd5b2001fd211d79aba85447.tar.gz
update tests
Diffstat (limited to 't/spore-request/exception.t')
-rw-r--r--t/spore-request/exception.t9
1 files changed, 8 insertions, 1 deletions
diff --git a/t/spore-request/exception.t b/t/spore-request/exception.t
index 162370a..5d5af38 100644
--- a/t/spore-request/exception.t
+++ b/t/spore-request/exception.t
@@ -4,11 +4,18 @@ use warnings;
use Test::More;
use Net::HTTP::Spore;
+my $mock_server = {
+ '/test_spore/_all_docs' => sub {
+ my $req = shift;
+ die;
+ },
+};
+
ok my $client =
Net::HTTP::Spore->new_from_spec( 't/specs/couchdb.json',
api_base_url => 'http://localhost:5984' );
-$client->enable( 'Test::Response', callback => sub { die } );
+$client->enable( 'Mock', tests => $mock_server );
my $res = $client->get_all_documents(database => 'test_spore');
is $res->[0], 599;