From 2388747fbf954de990862a6c01713d50823e8725 Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Tue, 24 Aug 2021 11:10:39 +0200 Subject: overhauled testing --- t/Extract.t | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 't/Extract.t') diff --git a/t/Extract.t b/t/Extract.t index 1d20d0f..5b719da 100644 --- a/t/Extract.t +++ b/t/Extract.t @@ -37,7 +37,6 @@ subtest folders => sub { my $result = decode_json $res[0]; is(@$result, 2); - ok($_ ~~ ['SUB.FOLDER', 'SENT']) for @$result; }; subtest count => sub { @@ -78,7 +77,10 @@ subtest read => sub { is @res, 1; my $result = decode_json $res[0]; - is($result->{from}, 'test'); + is_deeply($result->{from}, [{address => 'shipment-tracking@amazon.de', name => 'Amazon.de'}]); + ok($result->{date_received}); + ok(index($result->{date_received}, '2019-02-22T10:06:54') != -1); + like($result->{date_received}, qr'2019-02-22T10:06:54'); }; done_testing; -- cgit v1.2.3