diff options
author | Christian Schneider | 2020-04-10 09:17:18 +0200 |
---|---|---|
committer | Christian Schneider | 2020-04-10 09:17:18 +0200 |
commit | 82f8e7b0702787a623aaf9be7e444dda31472575 (patch) | |
tree | 5dd1151dee7ddaeab0000bbe92d8a783d855f636 | |
parent | c469bbf0383c1865a00c1cfe6dea23025bbe000e (diff) | |
download | itools-82f8e7b0702787a623aaf9be7e444dda31472575.tar.gz itools-82f8e7b0702787a623aaf9be7e444dda31472575.tar.bz2 itools-82f8e7b0702787a623aaf9be7e444dda31472575.zip |
Fix tests for new semantics of $it_dbi->delete_untouched()
-rwxr-xr-x | test/it_dbi.t | 10 |
1 files 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'); |