From 159d3d66095a051fe0baec4c40ef41ca125f400e Mon Sep 17 00:00:00 2001 From: "Bradley M. Kuhn" Date: Mon, 14 Dec 2015 17:28:19 -0800 Subject: [PATCH] Also verify it's a HASH reftype. --- Supporters/t/Supporters.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Supporters/t/Supporters.t b/Supporters/t/Supporters.t index 6d4a0b4..20efc41 100644 --- a/Supporters/t/Supporters.t +++ b/Supporters/t/Supporters.t @@ -8,7 +8,7 @@ use warnings; use Test::More tests => 55; use Test::Exception; -use Scalar::Util qw(looks_like_number); +use Scalar::Util qw(looks_like_number reftype); =pod @@ -263,7 +263,7 @@ $tempDBH = reopen_test_dbh(); $val = $tempDBH->selectall_hashref("SELECT id FROM supporter;", 'id'); -ok( (defined $val and keys(%{$val}) == 0), +ok( (defined $val and reftype $val eq "HASH" and keys(%{$val}) == 0), "addSupporter: fails if email_address given but email cannot be inserted");