Bug 19392: Clean-up behind auth_values_input_www.t
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 29 Sep 2017 19:28:13 +0000 (16:28 -0300)
committerMason James <mtj@kohaaloha.com>
Wed, 22 Nov 2017 12:43:58 +0000 (01:43 +1300)
The two categories created by this test script are not removed

Test plan:
without this patch, the two authorised value categories 学協会μμ and
tòmas are not removed when the script finishes.
Now it does!

Signed-off-by: Mason James <mtj@kohaaloha.com>

t/db_dependent/www/auth_values_input_www.t

index bcb441d..7f8e943 100644 (file)
@@ -28,6 +28,8 @@ use POSIX;
 use URI::Escape;
 use Encode;
 
+use Koha::AuthorisedValueCategories;
+
 my $testdir = File::Spec->rel2abs( dirname(__FILE__) );
 
 my $koha_conf = $ENV{KOHA_CONF};
@@ -118,6 +120,8 @@ if ($id_to_del) {
     ok($id_to_del ne undef, "error, link to delete not working");
 }
 
+Koha::AuthorisedValueCategories->find($category)->delete; # Clean up
+
 #---------------------------------------- Test with only latin utf-8 (could be taken as Latin-1/ISO 8859-1)
 
 $category = 'tòmas';
@@ -171,4 +175,6 @@ if ($id_to_del2) {
     ok($id_to_del2 ne undef, "error, link to delete not working");
 }
 
+Koha::AuthorisedValueCategories->find($category)->delete; # Clean up
+
 1;