summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/50-www-efa.t13
-rw-r--r--t/60-bin-efa.t14
2 files changed, 15 insertions, 12 deletions
diff --git a/t/50-www-efa.t b/t/50-www-efa.t
index bae1e94..8e56624 100644
--- a/t/50-www-efa.t
+++ b/t/50-www-efa.t
@@ -3,7 +3,7 @@ use strict;
use warnings;
use 5.010;
-use Test::More tests => 135;
+use Test::More tests => 131;
BEGIN {
use_ok('WWW::Efa');
@@ -116,13 +116,6 @@ is_efa_post(
);
is_efa_post(
- 'time', '22:23',
- ['itdTripDateTimeDepArr', 'dep'],
- ['itdTimeHour', '22'],
- ['itdTimeMinute', '23'],
-);
-
-is_efa_post(
'depart', '22:23',
['itdTripDateTimeDepArr', 'dep'],
['itdTimeHour', '22'],
@@ -137,12 +130,12 @@ is_efa_post(
);
is_efa_err(
- 'time', '37:00',
+ 'depart', '37:00',
'Must match HH:MM',
);
is_efa_err(
- 'time', '07',
+ 'depart', '07',
'Must match HH:MM',
);
diff --git a/t/60-bin-efa.t b/t/60-bin-efa.t
index 2b60233..0ae0b1f 100644
--- a/t/60-bin-efa.t
+++ b/t/60-bin-efa.t
@@ -94,13 +94,23 @@ for my $opt (qw/-w --walk-speed/) {
);
}
-for my $opt (qw/-t --time --depart -a --arrive/) {
+for my $opt (qw/-t --time --depart/) {
$cmd = Test::Command->new(cmd => "$efa $opt 35:12 $testarg");
$cmd->exit_isnt_num(0);
$cmd->stdout_is_eq($EMPTY);
$cmd->stderr_is_eq(
- mk_err('time', '35:12', 'Must match HH:MM')
+ mk_err('depart', '35:12', 'Must match HH:MM')
+ );
+}
+
+for my $opt (qw/-a --arrive/) {
+ $cmd = Test::Command->new(cmd => "$efa $opt 35:12 $testarg");
+
+ $cmd->exit_isnt_num(0);
+ $cmd->stdout_is_eq($EMPTY);
+ $cmd->stderr_is_eq(
+ mk_err('arrive', '35:12', 'Must match HH:MM')
);
}