test location in hCalendar
[HTML5TV.git] / t / HTML5TV-hCalendar.t
1 #!/usr/bin/perl
2
3 use warnings;
4 use strict;
5
6 use Test::More tests => 8;
7
8 use lib 'lib';
9
10 BEGIN {
11         use_ok( 'HTML5TV::hCalendar' );
12 }
13
14 my $path = shift @ARGV || 'media/hCalendar.html';
15
16 ok( my $hcal = HTML5TV::hCalendar->new( $path ), "new $path" );
17
18 foreach my $class ( qw/organiser summary url location dtstart description/ ) {
19         ok( defined( my $text = $hcal->$class ), $class );
20         diag "$class: $text";
21 }
22