1 |
#!/usr/bin/perl |
2 |
use strict; |
3 |
use warnings; |
4 |
|
5 |
my $debug = @ARGV ? 1 : 0; |
6 |
|
7 |
use Test::More tests => 6; |
8 |
use lib 'lib'; |
9 |
|
10 |
use Data::Dump qw/dump/; |
11 |
|
12 |
BEGIN { |
13 |
use_ok('App::RoomReservation::Confirmation'); |
14 |
} |
15 |
|
16 |
ok( my $o = App::RoomReservation::Confirmation->new( token => 42, request_url => '/', debug => $debug ), 'new' ); |
17 |
ok( my $markup = $o->verify_as_markup, 'verify' ); |
18 |
diag $markup if $debug; |
19 |
like( $markup, qr/problem/, 'markup content' ); |
20 |
|
21 |
ok( $markup = $o->cancel_as_markup, 'cancel' ); |
22 |
diag $markup if $debug; |
23 |
like( $markup, qr/problem/, 'markup content' ); |