summaryrefslogtreecommitdiff
path: root/t/21-vrr-ambig.t
blob: 7dd96a4e7c8ec3bdf92e67d49843e10d1da11ddb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env perl
use strict;
use warnings;
use 5.010;
use utf8;

use File::Slurp qw(slurp);
use Test::More tests => 7;

BEGIN {
	use_ok('Travel::Status::DE::VRR');
}
require_ok('Travel::Status::DE::VRR');

my $xml = slurp('t/in/essen_alfredusbad_ambiguous.xml');

my $status = Travel::Status::DE::VRR->new_from_xml(xml => $xml);

isa_ok($status, 'Travel::Status::DE::VRR');
can_ok($status, qw(errstr results));

$status->check_for_ambiguous();

is($status->errstr, 'Ambiguous name input: Alfredusbad | Am Alfredusbad',
	'errstr ok');

is_deeply([$status->lines], [], 'no lines');
is_deeply([$status->results], [], 'no results');