Bugzilla – Attachment 55274 Details for
Bug 17212
ITEMTYPECAT broken if there is another authorised value with same code
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17212: Add tests
Bug-17212-Add-tests.patch (text/plain), 1.57 KB, created by
Jonathan Druart
on 2016-09-07 08:49:30 UTC
(
hide
)
Description:
Bug 17212: Add tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-09-07 08:49:30 UTC
Size:
1.57 KB
patch
obsolete
>From 84a3e1adabbbf2ac0cabc429d1a8cf027bc3b264 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 7 Sep 2016 09:49:15 +0100 >Subject: [PATCH] Bug 17212: Add tests > >--- > t/db_dependent/Koha.t | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha.t b/t/db_dependent/Koha.t >index 82fdc5e..05ec726 100644 >--- a/t/db_dependent/Koha.t >+++ b/t/db_dependent/Koha.t >@@ -296,11 +296,12 @@ subtest 'GetFrameworksLoop() tests' => sub { > }; > > subtest 'GetItemTypesByCategory GetItemTypesCategorized test' => sub{ >- plan tests => 7; >+ plan tests => 8; > > my $insertGroup = Koha::AuthorisedValue->new( > { category => 'ITEMTYPECAT', > authorised_value => 'Quertyware', >+ lib_opac => 'lib4itemtypecat', > } > )->store; > >@@ -345,6 +346,17 @@ subtest 'GetItemTypesByCategory GetItemTypesCategorized test' => sub{ > } > @expected = ( 'BKghjklo1', 'Qwertyware', 'Veryheavybook' ); > is_deeply(\@results,\@expected, 'GetItemTypesCategorized: grouped and ungrouped items returned as expected.'); >+ >+ Koha::AuthorisedValue->new( >+ { category => 'CCODE', >+ authorised_value => 'Qwertyware', >+ lib_opac => 'lib4ccode', >+ } >+ )->store; >+ >+ $hrCat = GetItemTypesCategorized(); >+ is( $hrCat->{Qwertyware}{description}, 'lib4itemtypecat', 'GetItemTypesCategorized should correctly retrieve the lib_opac if another AV exist with the same code' ); >+ > }; > > subtest 'GetItemTypes test' => sub { >-- >2.8.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 17212
: 55274