summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2014-02-09 20:40:06 +0100
committerDaniel Friesel <derf@finalrewind.org>2014-02-09 20:40:06 +0100
commitbbe4294e1f164ac1a08ef36220ece85821ffddcc (patch)
treeb38027310dceb703c5a02f78f6e61783cb8bbdab
parente78caa80c912ee2edf1b4c57ce81a7025ccbfd17 (diff)
add transfer tests (plus regression test for e78caa8)
-rw-r--r--t/34-result-transfer.t33
1 files changed, 33 insertions, 0 deletions
diff --git a/t/34-result-transfer.t b/t/34-result-transfer.t
new file mode 100644
index 0000000..0c61c70
--- /dev/null
+++ b/t/34-result-transfer.t
@@ -0,0 +1,33 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use 5.014;
+use utf8;
+
+use DateTime;
+use Test::More tests => 4;
+use Test::Fatal;
+
+use Travel::Status::DE::IRIS;
+
+my $status = Travel::Status::DE::IRIS->new(
+ iris_base => 'file:t/in',
+ station => 'EDG',
+ datetime => DateTime->new(
+ year => 2014,
+ month => 2,
+ day => 9,
+ hour => 20,
+ minute => 16,
+ time_zone => 'Europe/Berlin'
+ )
+);
+
+my @results = $status->results;
+
+my $re2_a = $results[13];
+
+is($re2_a->train_no, '30030', 'transfer RE2: train_no is new no');
+is($re2_a->old_train_no, '10230', 'transfer RE2: old_train_no is old no');
+is($re2_a->train_id, '7760830705227608221', 'transfer RE2: train_id is new id');
+is($re2_a->old_train_id, '5716084173145223820', 'transfer RE2: old_train_id is new id');