Bugzilla – Attachment 62505 Details for
Bug 17944
Remove the sql code from itemtypes.pl administrative perl script
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17944 -Integrated the removal of SQL from itemtypes.pl admin script with the onboarding tool following tester feedback of merge conflict
Bug-17944--Integrated-the-removal-of-SQL-from-item.patch (text/plain), 1.80 KB, created by
Alex Buckley
on 2017-04-20 21:26:40 UTC
(
hide
)
Description:
Bug 17944 -Integrated the removal of SQL from itemtypes.pl admin script with the onboarding tool following tester feedback of merge conflict
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2017-04-20 21:26:40 UTC
Size:
1.80 KB
patch
obsolete
>From 429de2ab7ff95404cd7c5af1695f872640def129 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Fri, 21 Apr 2017 09:20:07 +1200 >Subject: [PATCH] Bug 17944 -Integrated the removal of SQL from itemtypes.pl > admin script with the onboarding tool following tester feedback of merge > conflict > >--- > t/db_dependent/Koha/ItemTypes.t | 17 ++++++++++------- > 1 file changed, 10 insertions(+), 7 deletions(-) > >diff --git a/t/db_dependent/Koha/ItemTypes.t b/t/db_dependent/Koha/ItemTypes.t >index 76fde51..0d44f27 100755 >--- a/t/db_dependent/Koha/ItemTypes.t >+++ b/t/db_dependent/Koha/ItemTypes.t >@@ -19,7 +19,7 @@ > > use Modern::Perl; > >-use Test::More tests => 20; >+use Test::More tests => 22; > use Data::Dumper; > use Koha::Database; > use t::lib::Mocks; >@@ -117,7 +117,7 @@ Koha::Item->new( > itemnumber => 1, > biblionumber => 1, > biblioitemnumber =>1, >- itype => 'type2', >+ itype => 'type1', > notforloan => 1, > itemlost => 0, > } >@@ -155,8 +155,8 @@ is( > 'item types should be sorted by translated description' > ); > >-subtest is_used => sub{ >- plan test => 2; >+sub is_used { >+ require Test::More; > my $itemtype_code = shift; > my $schema = Koha::Database->new()->schema(); > my $itemtotal = Koha::Items->search({ 'itype' => $itemtype_code })->count; >@@ -164,8 +164,11 @@ subtest is_used => sub{ > my $overalltotal = $itemtotal + $bibliototal; > return $overalltotal; > } >-for my $itemtype_code ('type1', 'type 2') { >- subtest "is_used $itemtype_code", \&is_used, $range; >-} >+ >+my $passcount = is_used('type1'); >+is ( $passcount,2,'Exists in the database, test is successful'); >+ >+my $failcount = is_used('type2'); >+is ( $failcount,0,'Doesnt exist in database, test is success'); > > $schema->txn_rollback; >-- >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 17944
:
59391
|
59564
|
59565
|
59655
|
59656
|
59657
|
59715
|
59716
|
59717
|
59718
|
59953
|
59954
|
62499
|
62500
|
62501
|
62502
|
62503
|
62504
|
62505
|
63045
|
63152
|
63220
|
63259
|
63307
|
63308
|
63309
|
63310
|
63924
|
63925