Bugzilla – Attachment 40675 Details for
Bug 13853
Show waiting hold expiration date for waiting holds in holds ajax datatable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13853 [QA Followup] - Add unit tests for branch getting methods
Bug-13853-QA-Followup---Add-unit-tests-for-branch-.patch (text/plain), 1.90 KB, created by
Kyle M Hall
on 2015-06-26 14:32:37 UTC
(
hide
)
Description:
Bug 13853 [QA Followup] - Add unit tests for branch getting methods
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2015-06-26 14:32:37 UTC
Size:
1.90 KB
patch
obsolete
>From d3fcdea93aefae8c5520ab2f755e6dfd660ae02d Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 25 Jun 2015 14:56:18 -0400 >Subject: [PATCH] Bug 13853 [QA Followup] - Add unit tests for branch getting methods > >--- > t/db_dependent/Items.t | 30 +++++++++++++++++++++++++++++- > 1 files changed, 29 insertions(+), 1 deletions(-) > >diff --git a/t/db_dependent/Items.t b/t/db_dependent/Items.t >index b41b483..1a528d6 100755 >--- a/t/db_dependent/Items.t >+++ b/t/db_dependent/Items.t >@@ -23,10 +23,11 @@ use C4::Biblio; > use C4::Branch; > use Koha::Database; > >-use Test::More tests => 6; >+use Test::More tests => 8; > > BEGIN { > use_ok('C4::Items'); >+ use_ok('Koha::Items'); > } > > my $dbh = C4::Context->dbh; >@@ -386,6 +387,33 @@ subtest 'SearchItems test' => sub { > $dbh->rollback; > }; > >+subtest 'Koha::Item(s) tests' => sub { >+ >+ plan tests => 5; >+ >+ # Start transaction >+ my $schema = Koha::Database->new()->schema(); >+ $schema->storage->txn_begin(); >+ $dbh->{RaiseError} = 1; >+ >+ # Create a biblio and item for testing >+ C4::Context->set_preference('marcflavour', 'MARC21'); >+ my ($bibnum, $bibitemnum) = get_biblio(); >+ my ($item_bibnum, $item_bibitemnum, $itemnumber) = AddItem({ homebranch => $branch1, holdingbranch => $branch2 } , $bibnum); >+ >+ # Get item. >+ my $item = Koha::Items->find( $itemnumber ); >+ ok( $item, "Got Koha::Item" ); >+ >+ my $homebranch = $item->home_branch(); >+ ok( $homebranch, "Got Koha::Branch from home_branch method" ); >+ is( $homebranch->branchcode(), $branch1, "Home branch code matches homebranch" ); >+ >+ my $holdingbranch = $item->holding_branch(); >+ ok( $holdingbranch, "Got Koha::Branch from holding_branch method" ); >+ is( $holdingbranch->branchcode(), $branch2, "Home branch code matches holdingbranch" ); >+}; >+ > # Helper method to set up a Biblio. > sub get_biblio { > my $bib = MARC::Record->new(); >-- >1.7.2.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 13853
:
36949
|
36984
|
39748
|
40026
|
40037
|
40417
|
40673
|
40674
|
40675
|
40755
|
40756
|
40757
|
40758