From 2676dfba22dfc55eb3a83ca34700ef6bc843ea9c Mon Sep 17 00:00:00 2001 From: "Bradley M. Kuhn" Date: Wed, 30 Dec 2015 17:53:54 -0800 Subject: [PATCH] setPublicAck: initial tests and docs. --- Supporters/t/Supporters.t | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Supporters/t/Supporters.t b/Supporters/t/Supporters.t index bb2e1f9..d4797cb 100644 --- a/Supporters/t/Supporters.t +++ b/Supporters/t/Supporters.t @@ -8,7 +8,7 @@ use strict; use warnings; -use Test::More tests => 242; +use Test::More tests => 241; use Test::Exception; use Sub::Override; use File::Temp qw/tempfile/; @@ -263,13 +263,6 @@ dies_ok { $sp->setPublicAck(0); } "setPublicAck: fails supporterId invali dies_ok { $sp->setPublicAck("String"); } "setPublicAck: fails supporterId is string"; dies_ok { $sp->setPublicAck(undef); } "setPublicAck: fails supporterId is undef"; -# Replace _verifyId() to always return true - -$overrideSub = Sub::Override->new( 'Supporters::_verifyId' => sub ($$) { return 1;} ); -dies_ok { $publicAckVal = $sp->setPublicAck(0); } - "setPublicAck: fails when rows are not returned but _verifyId() somehow passed"; -$overrideSub->restore; - is($sp->getPublicAck($olsonId), 0, "setPublicAck: 1 failed calls changed nothing."); is($sp->getPublicAck($drapperId), 1, "setPublicAck: 1 failed calls changed nothing."); is($sp->getPublicAck($sterlingId), undef, "setPublicAck: 1 failed calls changed nothing.");