From 797492ec8c039098849c8093e8d6412c3e5971f8 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 19 Apr 2016 19:08:22 +0200 Subject: add tests for identified_data --- t/20-vrr.t | 5 ++++- t/21-vrr-ambig.t | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 't') diff --git a/t/20-vrr.t b/t/20-vrr.t index 76176e9..95eb7a3 100644 --- a/t/20-vrr.t +++ b/t/20-vrr.t @@ -6,7 +6,7 @@ use utf8; use Encode qw(decode); use File::Slurp qw(slurp); -use Test::More tests => 111; +use Test::More tests => 113; BEGIN { use_ok('Travel::Status::DE::VRR'); @@ -20,6 +20,9 @@ my $status = Travel::Status::DE::VRR->new_from_xml(xml => $xml); isa_ok($status, 'Travel::Status::DE::EFA'); can_ok($status, qw(errstr results)); +is($status->errstr, undef, 'no error'); +is_deeply([$status->identified_data], [qw[Essen Hauptbahnhof]], 'identified_data'); + my @results = $status->results; for my $result (@results) { diff --git a/t/21-vrr-ambig.t b/t/21-vrr-ambig.t index fb03a43..e4783f5 100644 --- a/t/21-vrr-ambig.t +++ b/t/21-vrr-ambig.t @@ -5,7 +5,7 @@ use 5.010; use utf8; use File::Slurp qw(slurp); -use Test::More tests => 9; +use Test::More tests => 10; BEGIN { use_ok('Travel::Status::DE::VRR'); @@ -28,3 +28,4 @@ is_deeply([$status->name_candidates], ['Alfredusbad', 'Am Alfredusbad'], 'name c is_deeply([$status->lines], [], 'no lines'); is_deeply([$status->results], [], 'no results'); +is_deeply([$status->identified_data], [qw[Essen Alfredusbad]], 'identified data'); -- cgit v1.2.3