Bugzilla – Attachment 29179 Details for
Bug 12428
"OPAC info" is not displayed in the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12428: (QA followup) regression tests.
Bug-12428-QA-followup-regression-tests.patch (text/plain), 2.46 KB, created by
Tomás Cohen Arazi (tcohen)
on 2014-06-23 19:43:09 UTC
(
hide
)
Description:
Bug 12428: (QA followup) regression tests.
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2014-06-23 19:43:09 UTC
Size:
2.46 KB
patch
obsolete
>From 966e70e4b07d1254845748e7b4a846d0ad3ce44d Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Mon, 23 Jun 2014 16:36:43 -0300 >Subject: [PATCH] Bug 12428: (QA followup) regression tests. > >Just that. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> >--- > t/db_dependent/Items.t | 45 ++++++++++++++++++++++++++++++++++++++++++--- > 1 file changed, 42 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Items.t b/t/db_dependent/Items.t >index d1b15fb..dd8057b 100755 >--- a/t/db_dependent/Items.t >+++ b/t/db_dependent/Items.t >@@ -20,9 +20,11 @@ use Modern::Perl; > > use MARC::Record; > use C4::Biblio; >+use C4::Branch; > use Koha::Database; >+use Data::Printer; > >-use Test::More tests => 4; >+use Test::More tests => 5; > > BEGIN { > use_ok('C4::Items'); >@@ -38,8 +40,7 @@ subtest 'General Add, Get and Del tests' => sub { > $dbh->{AutoCommit} = 0; > $dbh->{RaiseError} = 1; > >- # Helper biblio. >- diag("Creating biblio instance for testing."); >+ # Create a biblio instance for testing > my ($bibnum, $bibitemnum) = get_biblio(); > > # Add an item. >@@ -143,6 +144,44 @@ subtest 'GetHiddenItemnumbers tests' => sub { > $dbh->rollback; > }; > >+subtest 'GetItemsInfo tests' => sub { >+ >+ plan tests => 3; >+ >+ # Start transaction >+ $dbh->{AutoCommit} = 0; >+ $dbh->{RaiseError} = 1; >+ >+ my $homebranch = 'CPL'; >+ my $holdingbranch = 'MPL'; >+ >+ # Add a biblio >+ my $biblionumber = get_biblio(); >+ # Add an item >+ my ($item_bibnum, $item_bibitemnum, $itemnumber) >+ = AddItem({ >+ homebranch => $homebranch, >+ holdingbranch => $holdingbranch >+ }, $biblionumber ); >+ >+ my $branch = GetBranchDetail( $homebranch ); >+ $branch->{ opac_info } = "homebranch OPAC info"; >+ ModBranch($branch); >+ >+ $branch = GetBranchDetail( $holdingbranch ); >+ $branch->{ opac_info } = "holdingbranch OPAC info"; >+ ModBranch($branch); >+ >+ my @results = GetItemsInfo( $biblionumber ); >+ ok( @results, 'GetItemsInfo returns results'); >+ is( $results[0]->{ home_branch_opac_info }, "homebranch OPAC info", >+ 'GetItemsInfo returns the correct home branch OPAC info notice' ); >+ is( $results[0]->{ holding_branch_opac_info }, "holdingbranch OPAC info", >+ 'GetItemsInfo returns the correct holding branch OPAC info notice' ); >+ >+ $dbh->rollback; >+}; >+ > subtest q{Test Koha::Database->schema()->resultset('Item')->itemtype()} => sub { > > plan tests => 2; >-- >1.9.1
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 12428
:
28877
|
29060
|
29062
|
29179
|
34094
|
34692
|
34722