diff options
-rwxr-xr-x | test/it_dbi.t | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/test/it_dbi.t b/test/it_dbi.t index 8528a86..4341991 100755 --- a/test/it_dbi.t +++ b/test/it_dbi.t @@ -177,23 +177,16 @@ $record->update(['foo' => "00"]); $rand = $record->x; is ( $record->_set(['x' => $rand, 'foo' => "0"]), - "SET `foo`='0'", + $record->_set(['foo' => "0"]), 'update: _set optimization' ); +$record->update(['foo' => '']); +ok(!$record->_set(['foo' => ""]), 'update: _set optimization no update "" => ""'); +ok($record->_set(['foo' => NULL]), 'update: _set optimization do update "" => NULL'); $record->update(['foo' => NULL]); -is ( - $record->_set(['foo' => ""]), - "SET `foo`=''", - 'update: _set optimization with NULL => ""' -); -$record->update(['foo' => "bar"]); -$record->update(['foo' => ""]); -is ( - $record->_set(['foo' => NULL]), - "SET `foo`=NULL", - 'update: _set optimization with "" => NULL' -); +ok($record->_set(['foo' => ""]), 'update: _set optimization do update NULL => ""'); +ok(!$record->_set(['foo' => NULL]), 'update: _set optimization no update NULL => NULL'); $record->update(['foo' => "bar"]); $record->select(['foo' => "bar"]); |