summaryrefslogtreecommitdiff
path: root/t/spore-middleware/auth-basic.t
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-10-17 21:46:03 +0200
committerfranck cuny <franck@lumberjaph.net>2010-10-17 21:46:03 +0200
commit1c3ba5b29669ff002ff9650535ec019f4022e1e1 (patch)
tree6e9402fcf6c1db8440b1bf77469b0589f46a80dc /t/spore-middleware/auth-basic.t
parentremove couchdb api; add dummy spec for tests (diff)
downloadnet-http-spore-1c3ba5b29669ff002ff9650535ec019f4022e1e1.tar.gz
update tests to use the dummy api, and replace api_base_url with base_url
Diffstat (limited to '')
-rw-r--r--t/spore-middleware/auth-basic.t6
1 files changed, 3 insertions, 3 deletions
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';
}