From 82f8e7b0702787a623aaf9be7e444dda31472575 Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Fri, 10 Apr 2020 09:17:18 +0200 Subject: Fix tests for new semantics of $it_dbi->delete_untouched() --- test/it_dbi.t | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/it_dbi.t b/test/it_dbi.t index 6214716..705e814 100755 --- a/test/it_dbi.t +++ b/test/it_dbi.t @@ -394,22 +394,22 @@ $record->delete(['WHERE 1' ]); $record->upsert(['ID' => 1, 'foo' => "a"]); $record->upsert(['ID' => 2, 'foo' => "b"]); $record->upsert(['ID' => 2, 'foo' => "B"]); -is($record->delete_untouched(), 0, 'delete_untouched'); +is($record->delete_untouched(), [], 'delete_untouched'); is(allrecs(), '[{"ID":1,"foo":"a"},{"ID":2,"foo":"B"}]', 'data after delete_untouched'); $record->upsert(['ID' => 1, 'foo' => "A"]); $record->upsert(['ID' => 3, 'foo' => "c"]); -is($record->delete_untouched([ 'ID >' => 2 ]), 0, 'delete_untouched with query'); +is($record->delete_untouched([ 'ID >' => 2 ]), [], 'delete_untouched with query'); is(allrecs(), '[{"ID":1,"foo":"A"},{"ID":2,"foo":"B"},{"ID":3,"foo":"c"}]', 'data after delete_untouched with query'); $record->upsert(['ID' => 3, 'foo' => "C"]); -is($record->delete_untouched(), 2, 'delete_untouched with query'); +is($record->delete_untouched(), [1, 2], 'delete_untouched with query'); is(allrecs(), '[{"ID":3,"foo":"C"}]', 'data after delete_untouched with query'); $record->replace(['ID' => 4, 'foo' => "C"]); -is($record->delete_untouched(), 1, 'delete_untouched after replace'); +is($record->delete_untouched(), [3], 'delete_untouched after replace'); is(allrecs(), '[{"ID":4,"foo":"C"}]', 'data after delete_untouched after replace'); $record->upsert(['ID' => 4, 'foo' => "C"]); -is($record->delete_untouched(), 0, 'delete_untouched after upsert without changes'); +is($record->delete_untouched(), [], 'delete_untouched after upsert without changes'); is(allrecs(), '[{"ID":4,"foo":"C"}]', 'data after delete_untouched after upsert without changes'); -- cgit v1.2.3