From 41e57579ea331ab2b4da02f6c998c19922af3789 Mon Sep 17 00:00:00 2001 From: tonnesen Date: Wed, 15 Jan 2003 22:12:20 +0000 Subject: [PATCH] Fixed catalog.t test to check for new confirmation before deleting biblios with biblioitems. --- t/webscripts/catalog.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/t/webscripts/catalog.t b/t/webscripts/catalog.t index aa4907f7ec..118efb513a 100644 --- a/t/webscripts/catalog.t +++ b/t/webscripts/catalog.t @@ -134,7 +134,6 @@ if ($title eq 'The Historical Supply Catalogue') { print "not ok ".$testnumber++." title is now $title\n"; } -$test='Delete Biblio with items - biblio #163'; $script="$intranetdir/cgi-bin/delbiblio.pl 'biblio=163'"; contains($script, $test, ['delete them before deleting this biblio']); @@ -148,6 +147,10 @@ if ($sth->rows) { $test='Delete Biblio with no items - biblio #57'; $script="$intranetdir/cgi-bin/delbiblio.pl 'biblio=57'"; +contains($script, $test, ['delete the biblio and all of its subgroups']); + +$test='Delete Biblio with no items, confirmed - biblio #57'; +$script="$intranetdir/cgi-bin/delbiblio.pl 'biblio=57&confirmed=1'"; contains($script, $test, ['location:', 'catalogue-home.pl']); $sth=$dbh->prepare("select * from biblio where biblionumber=57"); @@ -232,6 +235,7 @@ sub contains { foreach my $string (@$contains) { unless ($result=~/$string/) { print "not ok ".$testnumber++." $test (couldn't find '$string')\n"; + warn "\nTestnumber $testnumber ($test) failed. Couldn't find '$string' in output.\n"; return; } }