summaryrefslogtreecommitdiff
path: root/t/50-www-efa.t
diff options
context:
space:
mode:
Diffstat (limited to 't/50-www-efa.t')
-rw-r--r--t/50-www-efa.t27
1 files changed, 14 insertions, 13 deletions
diff --git a/t/50-www-efa.t b/t/50-www-efa.t
index 8a54025..e527272 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 => 127;
+use Test::More tests => 135;
BEGIN {
use_ok('WWW::Efa');
@@ -77,28 +77,29 @@ sub is_efa_err {
"conf ok: $key => $val",
);
+ isa_ok($efa->{'error'}, 'WWW::Efa::Error::Setup');
+
is(
- $efa->{'error'}->{'source'}, 'internal',
- "$key => $val: Error source is internal",
+ $efa->{'error'}->{'key'}, $key,
+ "$key => $val: Error: Correct key",
);
is(
- $efa->{'error'}->{'type'}, 'conf',
- "$key => $val: Error type is conf",
+ $efa->{'error'}->{'value'}, $val_want,
+ "$key => $val: Error: Correct valuef",
);
-
- is_deeply(
- $efa->{'error'}->{'data'}, [$key, $val_want, $str],
- "$key => $val: Error data is [$key, $val_want, $str]",
+ is(
+ $efa->{'error'}->{'message'}, $str,
+ "$key => $val: Error: String is '$str'",
);
}
is_efa_post('ignored', 'ignored');
my $efa = new_ok('WWW::Efa' => []);
-isa_ok($efa->{'error'}, 'WWW::Efa::Error');
-is($efa->{'error'}->{'source'}, 'internal');
-is($efa->{'error'}->{'type'}, 'conf' );
-is_deeply($efa->{'error'}->{'data'}, ['place', 'origin', 'Need at least two elements']);
+isa_ok($efa->{'error'}, 'WWW::Efa::Error::Setup');
+is($efa->{'error'}->{'key'}, 'place');
+is($efa->{'error'}->{'value'}, 'origin');
+is($efa->{'error'}->{'message'}, 'Need at least two elements');
is_efa_post(
'via', ['MH', 'HBf'],