From 1c3ba5b29669ff002ff9650535ec019f4022e1e1 Mon Sep 17 00:00:00 2001 From: franck cuny Date: Sun, 17 Oct 2010 21:46:03 +0200 Subject: update tests to use the dummy api, and replace api_base_url with base_url --- t/spore-middleware/auth-basic.t | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 't/spore-middleware/auth-basic.t') diff --git a/t/spore-middleware/auth-basic.t b/t/spore-middleware/auth-basic.t index e0e1f05..a6c5ac7 100644 --- a/t/spore-middleware/auth-basic.t +++ b/t/spore-middleware/auth-basic.t @@ -10,7 +10,7 @@ my $username = 'franck'; my $password = 's3kr3t'; my $mock_server = { - '/test_spore/_all_docs' => sub { + '/show' => sub { my $req = shift; my $auth = $req->header('Authorization'); if ($auth) { @@ -41,14 +41,14 @@ plan tests => 3 * @tests; foreach my $test (@tests) { ok my $client = Net::HTTP::Spore->new_from_spec( - 't/specs/couchdb.json', api_base_url => 'http://localhost:5984' + 't/specs/api.json', base_url => 'http://localhost/' ), 'client created'; foreach ( @{ $test->{middlewares} } ) { $client->enable(@$_); } - my $res = $client->get_all_documents( database => 'test_spore' ); + my $res = $client->get_info(); is $res->[0], $test->{expected}->{status}, 'valid HTTP status'; is $res->[2], $test->{expected}->{body}, 'valid HTTP body'; } -- cgit v1.2.3