Bugzilla – Attachment 13901 Details for
Bug 7919
Display of values depending on the connexion library (authorised values, patron categories, extended attributes)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7919: Fix unit test (Members_AttributeTypes.t)
Bug-7919-Fix-unit-test-MembersAttributeTypest.patch (text/plain), 1.68 KB, created by
Jonathan Druart
on 2012-12-06 09:28:02 UTC
(
hide
)
Description:
Bug 7919: Fix unit test (Members_AttributeTypes.t)
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2012-12-06 09:28:02 UTC
Size:
1.68 KB
patch
obsolete
>From fdf47492bc4bfb895821c843816682c0ce5e44f9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Thu, 6 Dec 2012 10:08:23 +0100 >Subject: [PATCH] Bug 7919: Fix unit test (Members_AttributeTypes.t) > >- 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 >--- > C4/Members/AttributeTypes.pm | 2 +- > t/Members_AttributeTypes.t | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Members/AttributeTypes.pm b/C4/Members/AttributeTypes.pm >index ac4153e..1754099 100644 >--- a/C4/Members/AttributeTypes.pm >+++ b/C4/Members/AttributeTypes.pm >@@ -74,7 +74,7 @@ sub GetAttributeTypes { > 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"; >diff --git a/t/Members_AttributeTypes.t b/t/Members_AttributeTypes.t >index 5aba165..152fc53 100755 >--- a/t/Members_AttributeTypes.t >+++ b/t/Members_AttributeTypes.t >@@ -37,7 +37,7 @@ my $dbh = C4::Context->dbh(); > > $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' ); > >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7919
:
8939
|
9170
|
9973
|
9984
|
10424
|
11163
|
11168
|
11373
|
11751
|
13736
|
13862
|
13867
|
13868
|
13891
|
13901
|
13952
|
13953
|
14162
|
14163
|
14184
|
14287
|
14350
|
14372
|
14377