/[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

Annotation of /lib/PXElator/t/CouchDB.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 221 - (hide annotations)
Sat Aug 15 14:21:55 2009 UTC (14 years, 9 months ago) by dpavlin
File MIME type: application/x-troff
File size: 514 byte(s)
cleanup CouchDB API
1 dpavlin 205 #!/usr/bin/perl
2    
3     use warnings;
4     use strict;
5     use autodie;
6    
7 dpavlin 221 use Test::More tests => 7;
8 dpavlin 205 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 dpavlin 221 diag 'doc ', dump( $doc );
22 dpavlin 205
23 dpavlin 221 ok( $db->put( $url, { foo => 99 }), "put $url" );
24 dpavlin 205
25 dpavlin 221 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