t/00-basic.t
changeset 71 46ba051d29bd
parent 68 8bc711bdd180
child 72 f095f28db247
--- a/t/00-basic.t	Sat Jun 04 22:07:56 2016 +0200
+++ b/t/00-basic.t	Sat Jun 04 22:08:13 2016 +0200
@@ -1,22 +1,24 @@
 use strict;
 use warnings;
+
 use Test::More qw(no_plan);
 use File::Temp;
 
-use_ok 'Exim::Grey' => qw(unseen)
-  or BAIL_OUT;
+use_ok 'Exim::Grey' => qw(unseen seen) or BAIL_OUT;
 
 my $db = File::Temp->new();
 
+is seen('a->x', 1, "$db"), 'no' => 'not seen a->x';
 is unseen('a->b', 1, "$db"), 'yes' => 'unseen a->b';
 is unseen('a->b', 1, "$db"), 'yes' => 'unseen a->b';
 
 is unseen('x->y/1.1.1.1', 1, "$db"), 'yes' => 'unseen x->y/1.1.1.1';
 is unseen('x->y/1.1.1.1', 1, "$db"), 'yes' => 'unseen x->y/1.1.1.1';
 
-# sleep
-is unseen('a->b',     0, "$db"), 'no' => 'seen a->b';
-is unseen('x->y/1.1.1.1', 0, "$db"), 'no' => 'seen x->y/1.1.1.1';
-is unseen('x->z/1.1.1.1', 0, "$db"), 'no' => 'seen x->z/1.1.1.1';
+is unseen('a->b',         0, "$db"), 'no' => 'not unseen a->b';
+is unseen('x->y/1.1.1.1', 0, "$db"), 'no' => 'not unseen x->y/1.1.1.1';
+is unseen('x->z/1.1.1.1', 0, "$db"), 'no' => 'not unseen x->z/1.1.1.1';
+is seen('x->z/1.1.1.1', 0, "$db"), 'yes' => 'seen x->z/1.1.1.1';
 
 is unseen('a->b', 600, "$db"), 'yes' => 'unseen a->b with 600s delay';
+is seen('a->b', 600, "$db"), 'no' => 'not seen a->b with 600s delay';