From 3bcb0dc7286acdc978b048defa09ac73cc3f48ea Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 6 Nov 2017 13:51:43 -0300 Subject: [PATCH] Bug 7317: (followup) Make tests independent of data on the DB Signed-off-by: Tomas Cohen Arazi Signed-off-by: Jonathan Druart --- Koha/Illrequest.pm | 1 - t/db_dependent/Illrequestattributes.t | 2 ++ t/db_dependent/Illrequests.t | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm index 5f6ee12a45..db5b9a9fe7 100644 --- a/Koha/Illrequest.pm +++ b/Koha/Illrequest.pm @@ -25,7 +25,6 @@ use File::Basename qw/basename/; use Koha::Database; use Koha::Email; use Koha::Exceptions::Ill; -use Koha::Illrequest; use Koha::Illrequestattributes; use Koha::Patron; use Mail::Sendmail; diff --git a/t/db_dependent/Illrequestattributes.t b/t/db_dependent/Illrequestattributes.t index 0eb5d5c107..d81215fdc2 100644 --- a/t/db_dependent/Illrequestattributes.t +++ b/t/db_dependent/Illrequestattributes.t @@ -34,6 +34,8 @@ subtest 'Basic object tests' => sub { $schema->storage->txn_begin; + Koha::Illrequestattributes->search->delete; + my $builder = t::lib::TestBuilder->new; my $illrqattr = $builder->build({ source => 'Illrequestattribute' }); diff --git a/t/db_dependent/Illrequests.t b/t/db_dependent/Illrequests.t index fd5772fd4c..4259a70fec 100644 --- a/t/db_dependent/Illrequests.t +++ b/t/db_dependent/Illrequests.t @@ -103,6 +103,8 @@ subtest 'Working with related objects' => sub { $schema->storage->txn_begin; + Koha::Illrequests->search->delete; + my $patron = $builder->build({ source => 'Borrower' }); my $illrq = $builder->build({ source => 'Illrequest', -- 2.39.5