Bug 20444: Update test
authorJosef Moravec <josef.moravec@gmail.com>
Mon, 19 Mar 2018 09:33:07 +0000 (09:33 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 3 May 2018 16:26:49 +0000 (13:26 -0300)
0) Apply this patch
1) prove t/db_dependent/Members/Attributes.t
should return green

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

t/db_dependent/Members/Attributes.t

index 918c9bf..cd409ed 100644 (file)
@@ -25,7 +25,7 @@ use C4::Members::AttributeTypes;
 use Koha::Database;
 use t::lib::TestBuilder;
 
-use Test::More tests => 55;
+use Test::More tests => 48;
 
 use_ok('C4::Members::Attributes');
 
@@ -58,24 +58,12 @@ my $borrowernumber = $patron->{borrowernumber};
 
 my $attribute_type1 = C4::Members::AttributeTypes->new('my code1', 'my description1');
 $attribute_type1->unique_id(1);
-my $attribute_types = C4::Members::Attributes::GetAttributes();
-is( @$attribute_types, 0, 'GetAttributes returns the correct number of attribute types' );
 $attribute_type1->store();
-$attribute_types = C4::Members::Attributes::GetAttributes();
-is( @$attribute_types, 1, 'GetAttributes returns the correct number of attribute types' );
-is( $attribute_types->[0], $attribute_type1->code(), 'GetAttributes returns the correct value for code' );
-$attribute_types = C4::Members::Attributes::GetAttributes(1);
-is( @$attribute_types, 0, 'GetAttributes returns the correct number of attribute types with the filter opac_only' );
 
 my $attribute_type2 = C4::Members::AttributeTypes->new('my code2', 'my description2');
 $attribute_type2->opac_display(1);
 $attribute_type2->staff_searchable(1);
 $attribute_type2->store();
-$attribute_types = C4::Members::Attributes::GetAttributes();
-is( @$attribute_types, 2, 'GetAttributes returns the correct number of attribute types' );
-is( $attribute_types->[1], $attribute_type2->code(), 'GetAttributes returns the correct value for code' );
-$attribute_types = C4::Members::Attributes::GetAttributes(1);
-is( @$attribute_types, 1, 'GetAttributes returns the correct number of attribute types with the filter opac_only' );
 
 my $new_library = $builder->build( { source => 'Branch' } );
 my $attribute_type_limited = C4::Members::AttributeTypes->new('my code3', 'my description3');