[Bps-public-commit] dbix-searchbuilder branch, set-undef-fix, updated. 1.59-36-gbce6221
? sunnavy
sunnavy at bestpractical.com
Mon May 30 12:26:06 EDT 2011
The branch, set-undef-fix has been updated
via bce622140b2e7d415f7beec37ecefb5f463bfa15 (commit)
from 0d52848f68e91ab0384caf978d91ecac15f3051e (commit)
Summary of changes:
t/02records_integers.t | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit bce622140b2e7d415f7beec37ecefb5f463bfa15
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue May 31 00:24:41 2011 +0800
test null set when the old value is already null
diff --git a/t/02records_integers.t b/t/02records_integers.t
index c886adf..5cf3e1c 100644
--- a/t/02records_integers.t
+++ b/t/02records_integers.t
@@ -6,7 +6,7 @@ use Test::More;
BEGIN { require "t/utils.pl" }
our (@AvailableDrivers);
-use constant TESTS_PER_DRIVER => 33;
+use constant TESTS_PER_DRIVER => 36;
my $total = scalar(@AvailableDrivers) * TESTS_PER_DRIVER;
plan tests => $total;
@@ -75,6 +75,15 @@ SKIP: {
ok($status, "status ok") or diag $status->error_message;
is($rec->Optional, undef, 'no value is NULL too');
+ $status = $rec->SetOptional;
+ ok(!$status, 'same null value set');
+ is(
+ ( $status->as_array )[1],
+ "That is already the current value",
+ "correct error message"
+ );
+ is($rec->Optional, undef, 'no value is NULL too');
+
# set operations on mandatory field
$status = $rec->SetMandatory( 2 );
ok($status, "status ok") or diag $status->error_message;
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list