Bugzilla – Attachment 34370 Details for
Bug 13455
Members/AddEnrolmentFeeIfNeeded.t requires sample data
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13455: Members/AddEnrolmentFeeIfNeeded.t requires sample data
Bug-13455-MembersAddEnrolmentFeeIfNeededt-requires.patch (text/plain), 2.11 KB, created by
Mark Tompsett
on 2014-12-12 20:49:57 UTC
(
hide
)
Description:
Bug 13455: Members/AddEnrolmentFeeIfNeeded.t requires sample data
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2014-12-12 20:49:57 UTC
Size:
2.11 KB
patch
obsolete
>From 4cca0d24be6d8e467188528572f2570284a01b7d Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Fri, 12 Dec 2014 15:42:47 -0500 >Subject: [PATCH] Bug 13455: Members/AddEnrolmentFeeIfNeeded.t requires > sample data > >TEST PLAN >--------- >1) Make sure there are no 'J', 'K', nor 'YA' patron category codes. >2) Make sure there are no 'CPL' nor 'MPL' branch codes. >3) prove t/db_dependent/Members/AddEnrolmentFeeIfNeeded.t > -- dies horribly >4) apply patch >5) prove t/db_dependent/Members/AddEnrolmentFeeIfNeeded.t > -- passes >6) Run koha qa test tools >--- > t/db_dependent/Members/AddEnrolmentFeeIfNeeded.t | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > >diff --git a/t/db_dependent/Members/AddEnrolmentFeeIfNeeded.t b/t/db_dependent/Members/AddEnrolmentFeeIfNeeded.t >index 46d9ec1..d530a1c 100644 >--- a/t/db_dependent/Members/AddEnrolmentFeeIfNeeded.t >+++ b/t/db_dependent/Members/AddEnrolmentFeeIfNeeded.t >@@ -3,11 +3,33 @@ use Test::More tests => 3; > > use C4::Context; > use C4::Members; >+use C4::Branch; > > my $dbh = C4::Context->dbh; > $dbh->{AutoCommit} = 0; > $dbh->{RaiseError} = 1; > >+# Add branches if they don't exist >+if (not defined GetBranchDetail('CPL')) { >+ ModBranch({add => 1, branchcode => 'CPL', branchname => 'Centerville'}); >+} >+if (not defined GetBranchDetail('MPL')) { >+ ModBranch({add => 1, branchcode => 'MPL', branchname => 'Midway'}); >+} >+ >+# Add default categories. >+$dbh->do("DELETE FROM categories WHERE categorycode='K';"); >+$dbh->do("DELETE FROM categories WHERE categorycode='J';"); >+$dbh->do("DELETE FROM categories WHERE categorycode='YA';"); >+my $sql = "INSERT INTO categories (categorycode, description, >+ enrolmentperiod, upperagelimit, dateofbirthrequired, finetype, >+ bulk, enrolmentfee, overduenoticerequired, issuelimit, >+ reservefee, category_type) VALUES >+('K','Kid',99,17,5,NULL,NULL,'0.000000',1,NULL,'0.000000','C'), >+('J','Juvenile',99,17,5,NULL,NULL,'0.000000',1,NULL,'0.000000','C'), >+('YA','Young Adult',99,17,5,NULL,NULL,'0.000000',1,NULL,'0.000000','C');"; >+$dbh->do($sql); >+ > my $enrolmentfee_K = 5; > my $enrolmentfee_J = 10; > my $enrolmentfee_YA = 20; >-- >1.7.9.5
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 13455
:
34370
|
36008