Skip to content

Commit

Permalink
Update tests for warnings as correctly seen post-d34aaa49
Browse files Browse the repository at this point in the history
Prior to d34aaa4, the test would pass in two circumstances:
 1. There was one warning, which matched "Couldn't parse..."
 2. There were two or more warnings, the first two of which were
    identical

Case (2) was in effect, not case (1) as the code may have mislead one to
believe.  As such, the test was even more confusingly useless prior.

Update the test to make explicit that it expects the warning twice.
  • Loading branch information
alexmv committed Oct 22, 2014
1 parent fa34393 commit 030fef0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion t/web/cf_date.t
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ diag 'check invalid inputs';

my @warnings = $m->get_warnings;
chomp @warnings;
is_deeply( [@warnings], [q{Couldn't parse date 'foodate' by Time::ParseDate}] );
is_deeply( [@warnings], [(q{Couldn't parse date 'foodate' by Time::ParseDate})x2] );
}

diag 'retain values when adding attachments';
Expand Down
2 changes: 1 addition & 1 deletion t/web/cf_datetime.t
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ diag 'check invalid inputs';

my @warnings = $m->get_warnings;
chomp @warnings;
is_deeply( [@warnings], [q{Couldn't parse date 'foodate' by Time::ParseDate}] );
is_deeply( [@warnings], [(q{Couldn't parse date 'foodate' by Time::ParseDate})x2] );
}

diag 'retain values when adding attachments';
Expand Down

0 comments on commit 030fef0

Please sign in to comment.