/[Frey]/trunk/t/App/RoomReservation-Reservation.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/App/RoomReservation-Reservation.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1146 - (show annotations)
Wed Jul 1 17:20:48 2009 UTC (14 years, 9 months ago) by dpavlin
File MIME type: application/x-troff
File size: 944 byte(s)
ensure that tests always pass
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4
5 my $debug = @ARGV ? 1 : 0;
6
7 use Test::More tests => 5;
8 use lib 'lib';
9
10 use Data::Dump qw/dump/;
11
12 BEGIN {
13 use_ok('App::RoomReservation::Reservation');
14 }
15
16 my $r = {
17 ime => 'Pero',
18 prezime => 'Preić',
19 institucija => 'Institut za istraživanje ruda i gubljenje vremena',
20 zanimanje => 'čuvar hladovine',
21 grad => 'Agram',
22 drzava => 'Hrvatska',
23 telefon => '01-555-555',
24 mobitel => '095-555-555',
25 email => "test+$$\@example.com",
26 email_verify => "test+$$\@example.com",
27 };
28
29 ok( my $o = App::RoomReservation::Reservation->new( request_url => '/', debug => $debug, %$r ), 'new' );
30 ok( my $markup = $o->create_as_markup, 'create' );
31 diag $markup if $debug;
32 #like( $markup, qr/skeleton/, 'markup content' );
33
34 $r->{email_verify} = 'wrong@example.com';
35 ok( ! eval { App::RoomReservation::Reservation->new( request_url => '/', debug => $debug, %$r ) }, 'e-mail wrong' );
36 like( $@, qr/e-mail/, 'died' );

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26