Bug 17216: Fix other tests

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2016-08-30 17:03:59 +01:00 committed by Brendan Gallagher
parent 4454c85b92
commit dc23d944ad
1 changed files with 6 additions and 1 deletions

View File

@ -7,6 +7,7 @@ use Modern::Perl;
use C4::Context;
use Koha::DateUtils qw(dt_from_string);
use Koha::AuthorisedValue;
use Koha::AuthorisedValueCategories;
use Test::More tests => 9;
use DateTime::Format::MySQL;
@ -31,7 +32,8 @@ subtest 'Authorized Values Tests' => sub {
imageurl => 'IMAGEURL'
};
my $avc = Koha::AuthorisedValueCategories->find($data->{category});
Koha::AuthorisedValueCategory->new({ category_name => $data->{category} })->store unless $avc;
# Insert an entry into authorised_value table
my $insert_success = Koha::AuthorisedValue->new(
{ category => $data->{category},
@ -61,6 +63,7 @@ subtest 'Authorized Values Tests' => sub {
SKIP: {
eval { require Test::Deep; import Test::Deep; };
skip "Test::Deep required to run the GetAuthorisedValues() tests.", 2 if $@;
Koha::AuthorisedValueCategory->new({ category_name => 'BUG10656' })->store;
Koha::AuthorisedValue->new(
{ category => 'BUG10656',
authorised_value => 'ZZZ',
@ -289,6 +292,8 @@ subtest 'GetFrameworksLoop() tests' => sub {
subtest 'GetItemTypesByCategory GetItemTypesCategorized test' => sub{
plan tests => 7;
my $avc = Koha::AuthorisedValueCategories->find('ITEMTYPECAT');
Koha::AuthorisedValueCategory->new({ category_name => 'ITEMTYPECAT' })->store unless $avc;
my $insertGroup = Koha::AuthorisedValue->new(
{ category => 'ITEMTYPECAT',
authorised_value => 'Quertyware',