diff options
author | Nathan Gass | 2023-02-28 18:57:33 +0100 |
---|---|---|
committer | Nathan Gass | 2023-02-28 18:57:57 +0100 |
commit | 569aaa65f5523069adb748715e36c9e3cba3992d (patch) | |
tree | 23d75c9f1a9e9c2cbc09a1e3ba48a7402e6c13c1 /test | |
parent | 305fa5f80db7691597abc607020622e7c065eaed (diff) | |
download | itools-569aaa65f5523069adb748715e36c9e3cba3992d.tar.gz itools-569aaa65f5523069adb748715e36c9e3cba3992d.tar.bz2 itools-569aaa65f5523069adb748715e36c9e3cba3992d.zip |
adapt escaping of ints and floats to better handle booleans and strings as input
Diffstat (limited to 'test')
-rwxr-xr-x | test/it_dbi.t | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/it_dbi.t b/test/it_dbi.t index ff0303a..356a093 100755 --- a/test/it_dbi.t +++ b/test/it_dbi.t @@ -174,11 +174,14 @@ is( "update" ); -$record->update(['flag' => 1]); -is($record->flag, true, "use integer 1 to set flag to true"); +$record->update(['flag' => "astring"]); +is($record->flag, 0, "use non-numeric string to set tinyint flag"); -$record->update(['flag' => 0]); -is($record->flag, false, "use integer 0 to set flag to false"); +$record->update(['flag' => true]); +is($record->flag, 1, "use boolean true to set tinyint flag"); + +$record->update(['flag' => false]); +is($record->flag, 0, "use boolean false to set tinyint flag"); is( $record->update(['x' => 18], ['x' => 17]), |