/[webpac2]/trunk/t/5-output-dbi.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 /trunk/t/5-output-dbi.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1210 - (show annotations)
Sat May 30 15:26:25 2009 UTC (14 years, 11 months ago) by dpavlin
File MIME type: application/x-troff
File size: 510 byte(s)
 r1906@llin:  dpavlin | 2009-05-30 17:26:17 +0200
 added table name to row normalize command so we can create
 data in different tables directly from normalization file

1 #!/usr/bin/perl -w
2
3 use strict;
4 use blib;
5
6 use Test::More tests => 6;
7
8 BEGIN {
9 use lib 'lib';
10 use_ok( 'WebPAC::Test' );
11 use_ok( 'WebPAC::Output::DBI' );
12 }
13
14 ok(my $out = new WebPAC::Output::DBI({
15 dsn => 'dbi:Pg:dbname=webpac2',
16 schema => "$abs_path/conf/schema.sql",
17 %LOG
18 }), "new");
19
20 ok( $out->init, 'init' );
21
22 my $ds = { '_rows' => {
23 'test' => [
24 { foo => 42 },
25 { foo => 1, bar => 11 },
26 { foo => 99, baz => 'text' },
27 ],
28 } };
29
30 ok( $out->add( 42, $ds ), 'add 42' );
31
32 ok( $out->finish, 'finish' );
33

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26