Bugzilla – Attachment 58599 Details for
Bug 17825
Remove C4::Members::AttributeTypes::AttributeTypeExists
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 17825: (followup) Remove unused function AttributeTypeExists
SIGNED-OFF-Bug-17825-followup-Remove-unused-functi.patch (text/plain), 2.13 KB, created by
Owen Leonard
on 2017-01-04 17:20:21 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 17825: (followup) Remove unused function AttributeTypeExists
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2017-01-04 17:20:21 UTC
Size:
2.13 KB
patch
obsolete
>From 896e649e6a1ca5790275a7f5d35e4642afa06ffa Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 29 Dec 2016 11:40:57 -0300 >Subject: [PATCH] [SIGNED-OFF] Bug 17825: (followup) Remove unused function > AttributeTypeExists > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > C4/Members/AttributeTypes.pm | 16 ---------------- > t/Members_AttributeTypes.t | 10 +--------- > 2 files changed, 1 insertion(+), 25 deletions(-) > >diff --git a/C4/Members/AttributeTypes.pm b/C4/Members/AttributeTypes.pm >index d4927db..5302eea 100644 >--- a/C4/Members/AttributeTypes.pm >+++ b/C4/Members/AttributeTypes.pm >@@ -89,22 +89,6 @@ sub GetAttributeTypes_hashref { > return \%hash; > } > >-=head2 AttributeTypeExists >- >- my $have_attr_xyz = C4::Members::AttributeTypes::AttributeTypeExists($code) >- >-Returns true if we have attribute type C<$code> >-in the database. >- >-=cut >- >-sub AttributeTypeExists { >- my ($code) = @_; >- my $dbh = C4::Context->dbh; >- my $exists = $dbh->selectrow_array("SELECT code FROM borrower_attribute_types WHERE code = ?", undef, $code); >- return $exists; >-} >- > =head1 METHODS > > my $attr_type = C4::Members::AttributeTypes->new($code, $description); >diff --git a/t/Members_AttributeTypes.t b/t/Members_AttributeTypes.t >index 4b4d5a1..4721fad 100755 >--- a/t/Members_AttributeTypes.t >+++ b/t/Members_AttributeTypes.t >@@ -24,7 +24,7 @@ use Module::Load::Conditional qw/check_install/; > > BEGIN { > if ( check_install( module => 'Test::DBIx::Class' ) ) { >- plan tests => 10; >+ plan tests => 8; > } else { > plan skip_all => "Need Test::DBIx::Class" > } >@@ -74,14 +74,6 @@ is( $members_attributetypes[0]->{'class'}, > is( $members_attributetypes[1]->{'class'}, > 'silver', 'Second class value is silver' ); > >-ok( C4::Members::AttributeTypes::AttributeTypeExists('one'), >- 'checking an attribute type exists' ); >- >-ok( >- !C4::Members::AttributeTypes::AttributeTypeExists('three'), >- "checking a attribute that isn't in the code doesn't exist" >-); >- > ok( C4::Members::AttributeTypes->fetch('one'), "testing fetch feature" ); > > ok( !C4::Members::AttributeTypes->fetch('FAKE'), >-- >2.1.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 17825
:
58491
|
58492
|
58598
|
58599
|
61713
|
61714