/[Frey]/trunk/t/21-frey-web-links.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/21-frey-web-links.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 110 - (hide annotations)
Sun Jul 13 16:15:45 2008 UTC (15 years, 9 months ago) by dpavlin
Original Path: trunk/t/21-fey-web-links.t
File MIME type: application/x-troff
File size: 627 byte(s)
simple links to current page with one param
1 dpavlin 110 #!/usr/bin/perl
2     use strict;
3     use warnings;
4    
5     my $debug = shift @ARGV;
6    
7     use Test::More tests => 7;
8     use lib 'lib';
9    
10     use Data::Dump qw/dump/;
11    
12     BEGIN {
13     use_ok('Frey::Web::Links');
14     use_ok('Strix::User');
15     }
16    
17     ok( my $u = Frey::Web::Links->new(
18     name => 'foo',
19     current => 3,
20     values => [ 1 .. 5 ],
21     delimiter => '!',
22     ), 'new' );
23    
24     diag dump( $u ) if $debug;
25    
26     ok( my $h = $u->links, 'links' );
27     diag $h if $debug;
28    
29     cmp_ok( $h, 'eq',
30     '<a href="?foo=1">1</a>!<a href="?foo=2">2</a>!<em>3</em>!<a href="?foo=4">4</a>!<a href="?foo=5">5</a>'
31     , 'markup' );
32    
33     ok( my @l = $u->links, 'links as array' );
34     cmp_ok( scalar @l, '==', 5, '5 links' );

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26