summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2014-02-02 16:04:00 +0100
committerDaniel Friesel <derf@finalrewind.org>2014-02-02 16:04:00 +0100
commit0c0386264c7a08cea15cd8794aa9220df7d110e7 (patch)
tree9345d290d01f50ad72e72428858594c7ee71763a /t
parent7bbd09e68aba30218694d580f48f8a1a1d59aa34 (diff)
Remove duplicates from delay and qos messages
Diffstat (limited to 't')
-rw-r--r--t/32-result-messages.t68
1 files changed, 40 insertions, 28 deletions
diff --git a/t/32-result-messages.t b/t/32-result-messages.t
index 4e30355..355162a 100644
--- a/t/32-result-messages.t
+++ b/t/32-result-messages.t
@@ -26,31 +26,43 @@ my $status = Travel::Status::DE::IRIS->new(
my @results = $status->results;
my $ice645 = $results[0];
-my $s1 = $results[1];
-my $s9 = $results[8];
-my $hkx = $results[10];
-my $abr = $results[13];
-
-is_deeply([$ice645->info],
-['Witterungsbedingte Störung', 'Unwetter', 'Abweichende Wagenreihung'],
-'info: no dups, sorted, msg+qos');
-
-is_deeply([$ice645->messages], [
-['2014-01-03T19:03:00', 'Witterungsbedingte Störung'],
-['2014-01-03T19:15:00', 'Witterungsbedingte Störung'],
-['2014-01-03T19:48:00', 'Witterungsbedingte Störung'],
-['2014-01-03T19:58:00', 'Witterungsbedingte Störung'],
-['2014-01-03T19:59:00', 'Witterungsbedingte Störung'],
-['2014-01-03T20:00:00', 'Witterungsbedingte Störung'],
-['2014-01-03T20:01:00', 'Unwetter'],
-['2014-01-03T20:02:00', 'Abweichende Wagenreihung']], 'messages: with dups');
-
-is_deeply([$ice645->qos_messages], [
-['2014-01-03T20:02:00', 'Abweichende Wagenreihung']], 'qos_messages');
-
-TODO: {
- local $TODO = 'no duplicate finding yet';
- is_deeply([$ice645->delay_messages], [
-['2014-01-03T19:03:00', 'Witterungsbedingte Störung'],
-['2014-01-03T20:01:00', 'Unwetter']], 'delay_messages: no dups');
-}
+my $s1 = $results[1];
+my $s9 = $results[8];
+my $hkx = $results[10];
+my $abr = $results[13];
+
+is_deeply(
+ [ $ice645->info ],
+ [ 'Witterungsbedingte Störung', 'Unwetter', 'Abweichende Wagenreihung' ],
+ 'info: no dups, sorted, msg+qos'
+);
+
+is_deeply(
+ [ $ice645->messages ],
+ [
+ [ '2014-01-03T20:02:00', 'Abweichende Wagenreihung' ],
+ [ '2014-01-03T20:01:00', 'Unwetter' ],
+ [ '2014-01-03T20:00:00', 'Witterungsbedingte Störung' ],
+ [ '2014-01-03T19:59:00', 'Witterungsbedingte Störung' ],
+ [ '2014-01-03T19:58:00', 'Witterungsbedingte Störung' ],
+ [ '2014-01-03T19:48:00', 'Witterungsbedingte Störung' ],
+ [ '2014-01-03T19:15:00', 'Witterungsbedingte Störung' ],
+ [ '2014-01-03T19:03:00', 'Witterungsbedingte Störung' ]
+ ],
+ 'messages: with dups'
+);
+
+is_deeply(
+ [ $ice645->qos_messages ],
+ [ [ '2014-01-03T20:02:00', 'Abweichende Wagenreihung' ] ],
+ 'qos_messages'
+);
+
+is_deeply(
+ [ $ice645->delay_messages ],
+ [
+ [ '2014-01-03T20:01:00', 'Unwetter' ],
+ [ '2014-01-03T20:00:00', 'Witterungsbedingte Störung' ]
+ ],
+ 'delay_messages: no dups'
+);