- Reintroduce the class column in a select statement (was present before
this development)
- FIX UT: If there are no arg passed in parameter, the routine calls
C4::Context->userenv which call an execute statement. It consumes the
mocked resultset
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Elliott Davis <elliott@test.bywatersolutions.com>
All tests successful.
Files=1, Tests=9, 0 wallclock secs ( 0.02 usr 0.01 sys + 0.16 cusr 0.06 csys = 0.25 CPU)
Result: PASS
my $branch_limit = $no_branch_limit
? 0
: C4::Context->userenv ? C4::Context->userenv->{"branch"} : 0;
- my $select = $all ? '*' : 'DISTINCT(code), description';
+ my $select = $all ? '*' : 'DISTINCT(code), description, class';
my $dbh = C4::Context->dbh;
my $query = "SELECT $select FROM borrower_attribute_types";
$dbh->{mock_add_resultset} = $members_attributetypes;
-my @members_attributetypes = C4::Members::AttributeTypes::GetAttributeTypes();
+my @members_attributetypes = C4::Members::AttributeTypes::GetAttributeTypes(undef, 1);
is( $members_attributetypes[0]->{'code'}, 'one', 'First code value is one' );