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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1056 - (hide annotations)
Tue Nov 20 10:08:00 2007 UTC (16 years, 6 months ago) by dpavlin
File MIME type: application/x-troff
File size: 723 byte(s)
 r1649@llin:  dpavlin | 2007-11-20 10:32:15 +0100
 experimental WebPAC::Output::Jifty to create arbitrary data in
 Jifty models

1 dpavlin 1056 #!/usr/bin/perl -w
2    
3     use strict;
4     use blib;
5    
6     use Test::More tests => 8;
7    
8     BEGIN {
9     use_ok( 'WebPAC::Test' );
10     use_ok( 'WebPAC::Output::Jifty' );
11     }
12    
13     ok(my $out = new WebPAC::Output::Jifty({
14     path => '/data/Webpacus2/',
15     model => 'Webpacus::Model::UFO',
16     clean => 1,
17     %LOG
18     }), "new");
19    
20     ok( $out->init, 'init' );
21    
22     my $ds = {
23     date => {
24     display => '2007-11-19',
25     },
26     time => {
27     display => '23:20:19',
28     },
29     town => {
30     display => 'Sometown',
31     },
32     county => {
33     display => 'Somewhere',
34     },
35     comment => {
36     display => 'test data',
37     }
38     };
39    
40     throws_ok { $out->add( ) } qr/need id/, 'add without params';
41     throws_ok { $out->add( 42 ) } qr/need ds/, 'add without ds';
42    
43     ok( $out->add( 42, $ds ), 'add 42' );
44    
45     ok( $out->finish, 'finish' );
46    

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26