/[pxelator]/lib/PXElator/t/CouchDB.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /lib/PXElator/t/CouchDB.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 221 - (show annotations)
Sat Aug 15 14:21:55 2009 UTC (14 years, 8 months ago) by dpavlin
File MIME type: application/x-troff
File size: 514 byte(s)
cleanup CouchDB API
1 #!/usr/bin/perl
2
3 use warnings;
4 use strict;
5 use autodie;
6
7 use Test::More tests => 7;
8 use Data::Dump qw/dump/;
9
10 use_ok 'CouchDB';
11
12 my $db = 'pxelator';
13 my $url = "$db/test";
14
15 ok( my $db = CouchDB->new(), 'new' );
16
17 ok( $db->put( $url, { foo => 42, bar => 'baz' }), "put $url" );
18
19 ok( my $doc = $db->get( $url, 'get' ), 'get' );
20
21 diag 'doc ', dump( $doc );
22
23 ok( $db->put( $url, { foo => 99 }), "put $url" );
24
25 ok( $db->delete( $url ), 'delete' );
26
27 ok( CouchDB::audit( 'test', { foo => 42, bar => 'baz' }), 'audit' );
28

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26