From f2922920e4fc2c2c22f2bb38d70c5b671a44a852 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 26 Dec 2018 14:55:53 -0300 Subject: [PATCH] Bug 21912: (QA follow-up) Do not delete existing patrons Signed-off-by: Tomas Cohen Arazi Signed-off-by: Nick Clemens (cherry picked from commit 8e6c789255a60958ed12eb399b1acd21819fd40c) Signed-off-by: Martin Renvoize (cherry picked from commit 9b6b80488a6b9315b201a3f6d11d0341e58122b5) Signed-off-by: Jesse Maseto (cherry picked from commit 91fbe63d18c7370a1105c21de890fc81c7583f3f) Signed-off-by: Fridolin Somers --- t/db_dependent/Koha/Objects.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/Koha/Objects.t b/t/db_dependent/Koha/Objects.t index d9533f52f9..74ec5606de 100644 --- a/t/db_dependent/Koha/Objects.t +++ b/t/db_dependent/Koha/Objects.t @@ -260,7 +260,7 @@ subtest '->search() tests' => sub { $schema->storage->txn_begin; - Koha::Patrons->delete; + my $count = Koha::Patrons->search->count; # Create 10 patrons foreach (1..10) { @@ -270,7 +270,7 @@ subtest '->search() tests' => sub { my $patrons = Koha::Patrons->search(); is( ref($patrons), 'Koha::Patrons', 'search in scalar context returns the Koha::Object-based type' ); my @patrons = Koha::Patrons->search(); - is( scalar @patrons, 10, 'search in list context returns a list of objects' ); + is( scalar @patrons, $count + 10, 'search in list context returns a list of objects' ); my $i = 0; foreach (1..10) { is( ref($patrons[$i]), 'Koha::Patron', 'Objects in the list have the singular type' ); -- 2.20.1