Bugzilla – Attachment 67062 Details for
Bug 10132
Add option to set MarcOrgCode on branch level
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10132: Unit tests
Bug-10132-Unit-tests.patch (text/plain), 1.76 KB, created by
Tomás Cohen Arazi
on 2017-09-11 19:16:06 UTC
(
hide
)
Description:
Bug 10132: Unit tests
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2017-09-11 19:16:06 UTC
Size:
1.76 KB
patch
obsolete
>From 41e7675be43e5a504542f5858552188a8eea6603 Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Sun, 11 Jun 2017 19:48:50 +0000 >Subject: [PATCH] Bug 10132: Unit tests > >Signed-off-by: Hugo Agud <hagud@orex.es> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/db_dependent/Koha/Libraries.t | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Libraries.t b/t/db_dependent/Koha/Libraries.t >index 483c7c8..3bf66ec 100644 >--- a/t/db_dependent/Koha/Libraries.t >+++ b/t/db_dependent/Koha/Libraries.t >@@ -19,7 +19,7 @@ > > use Modern::Perl; > >-use Test::More tests => 9; >+use Test::More tests => 11; > > use Koha::Library; > use Koha::Libraries; >@@ -27,6 +27,7 @@ use Koha::LibraryCategory; > use Koha::LibraryCategories; > use Koha::Database; > >+use t::lib::Mocks; > use t::lib::TestBuilder; > > my $schema = Koha::Database->new->schema; >@@ -39,6 +40,7 @@ my $new_library_1 = Koha::Library->new({ > branchcode => 'my_bc_1', > branchname => 'my_branchname_1', > branchnotes => 'my_branchnotes_1', >+ marcorgcode => 'US-MyLib', > })->store; > my $new_library_2 = Koha::Library->new({ > branchcode => 'my_bc_2', >@@ -86,4 +88,8 @@ is( Koha::Libraries->search->count, $nb_of_libraries + 1, 'Delete should have de > $retrieved_category_2->delete; > is( Koha::LibraryCategories->search->count, $nb_of_categories + 2, 'Delete should have deleted the library category' ); > >+t::lib::Mocks::mock_preference('MARCOrgCode', 'US-Default'); >+is( $new_library_1->get_effective_marcorgcode, 'US-MyLib', 'If defined, use library\'s own marc org code'); >+is( $new_library_2->get_effective_marcorgcode, 'US-Default', 'If not defined library\' marc org code, use the one from system preferences'); >+ > $schema->storage->txn_rollback; >-- >2.7.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 10132
:
64183
|
64184
|
64185
|
64186
|
64187
|
67060
|
67061
| 67062 |
67063
|
67064
|
67065
|
67066
|
67067
|
67208
|
67211