diff options
author | Urban Müller | 2010-11-03 17:04:54 +0000 |
---|---|---|
committer | Urban Müller | 2010-11-03 17:04:54 +0000 |
commit | 73fd376c51852805a2832896cea33bad9009c6d3 (patch) | |
tree | c20ef5c9ee2c7c90bf4a76cdb1ae03317f0023d1 /tests | |
parent | 82d2d98a11234ee24dafc01e1565cdf1c4584cd7 (diff) | |
download | itools-73fd376c51852805a2832896cea33bad9009c6d3.tar.gz itools-73fd376c51852805a2832896cea33bad9009c6d3.tar.bz2 itools-73fd376c51852805a2832896cea33bad9009c6d3.zip |
dbi::update() returns affected rows
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/it_dbi.t | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/it_dbi.t b/tests/it_dbi.t index 3428c0f..3ee2562 100755 --- a/tests/it_dbi.t +++ b/tests/it_dbi.t @@ -132,6 +132,18 @@ is( "update" ); +is( + $record->update(array('x' => 18), array('x' => 17)), + 1, + "return affected rows", +); + +is( + $record->update(array('x' => 18), array('x' => 17)), + 0, + "return zero affected rows", +); + $record->update(array('-x' => 'RAND() * 10')); isnt( array($record->_key, $record->x, $record->foo), |