From 8209bf10269c36c1bb8d4b2da23fe356ab7a3568 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Thu, 2 Jan 2014 17:15:56 +1300 Subject: [PATCH] Bug 11457: avoid spurious test failure in t/db_dependent/Bookseller.t This patch clears the subscription table so tests pass correctly if there happens to have been a subscription with an end date before 2013-08-01. To test 1/ Add a subscription in the serials module, with an end date before 2013-08-01 2/ run prove -v t/db_dependent/Bookseller.t Notice tests 22 and 23 fail 3/ Apply patch 4/ run test again 5/ Notice tests succeed Signed-off-by: Katrin Fischer Tests now clean the subscription table before running the tests, so that the will always pass. Signed-off-by: Jonathan Druart Signed-off-by: Galen Charlton --- t/db_dependent/Bookseller.t | 2 ++ 1 file changed, 2 insertions(+) diff --git a/t/db_dependent/Bookseller.t b/t/db_dependent/Bookseller.t index 133ffb575c..d12f263e3c 100644 --- a/t/db_dependent/Bookseller.t +++ b/t/db_dependent/Bookseller.t @@ -35,6 +35,8 @@ $dbh->{AutoCommit} = 0; $dbh->do(q|DELETE FROM aqorders|); $dbh->do(q|DELETE FROM aqbasket|); $dbh->do(q|DELETE FROM aqbooksellers|); +$dbh->do(q|DELETE FROM subscription|); + #Test AddBookseller my $count = scalar( C4::Bookseller::GetBookSeller('') ); my $sample_supplier1 = { -- 2.39.2