From 17f0f571e866c94ab100916f79150362a5aacd6b Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Fri, 12 Dec 2014 17:03:17 -0500 Subject: [PATCH] Bug 13457: Suggestions.t expects sample itemtypes TEST PLAN --------- 1) Make sure you have more than 8 item types, and preferably something with a non-sample default code for itemtypes. 2) prove t/db_dependent/Suggestions.t -- this will fail 3) Apply patch 4) prove t/db_dependent/Suggestions.t -- this will succeed 5) run koha qa test tools Signed-off-by: Paola Rossi --- t/db_dependent/Suggestions.t | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/t/db_dependent/Suggestions.t b/t/db_dependent/Suggestions.t index 1584301..1bed7c4 100644 --- a/t/db_dependent/Suggestions.t +++ b/t/db_dependent/Suggestions.t @@ -37,6 +37,19 @@ my $dbh = C4::Context->dbh; $dbh->{AutoCommit} = 0; $dbh->{RaiseError} = 1; +# Reset item types to only the default ones +$dbh->do(q|DELETE FROM itemtypes;|); +my $sql = " +INSERT INTO itemtypes (itemtype, description, rentalcharge, notforloan, imageurl, summary) VALUES +('BK', 'Books',5,0,'bridge/book.gif',''), +('MX', 'Mixed Materials',5,0,'bridge/kit.gif',''), +('CF', 'Computer Files',5,0,'bridge/computer_file.gif',''), +('MP', 'Maps',5,0,'bridge/map.gif',''), +('VM', 'Visual Materials',5,1,'bridge/dvd.gif',''), +('MU', 'Music',5,0,'bridge/sound.gif',''), +('CR', 'Continuing Resources',5,0,'bridge/periodical.gif',''), +('REF', 'Reference',0,1,'bridge/reference.gif','');"; +$dbh->do($sql); $dbh->do(q|DELETE FROM suggestions|); $dbh->do(q|DELETE FROM issues|); $dbh->do(q|DELETE FROM borrowers|); -- 1.7.10.4