From 73fd376c51852805a2832896cea33bad9009c6d3 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Wed, 3 Nov 2010 17:04:54 +0000 Subject: dbi::update() returns affected rows --- tests/it_dbi.t | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests') 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), -- cgit v1.2.3