Bugzilla – Attachment 52303 Details for
Bug 16607
Remove CPL/MPL from two unit tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16607: Remove CPL/MPL from two unit tests
Bug-16607-Remove-CPLMPL-from-two-unit-tests.patch (text/plain), 3.30 KB, created by
Marc Véron
on 2016-06-13 08:16:38 UTC
(
hide
)
Description:
Bug 16607: Remove CPL/MPL from two unit tests
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2016-06-13 08:16:38 UTC
Size:
3.30 KB
patch
obsolete
>From c0f2ca57c072888c018da3043dde9c0409d892b4 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 27 May 2016 08:35:57 +0200 >Subject: [PATCH] Bug 16607: Remove CPL/MPL from two unit tests >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Test t/db_dependent/Accounts.t: >This test created a MPL branch, but did not use it any more. > >Test t/db_dependent/Items/AutomaticItemModificationByAge.t: >This test still used CPL/MPL branches. Now it uses two new branches. > >Test plan: >[1] Run t/db_dependent/Accounts.t. >[2] Run t/db_dependent/Items/AutomaticItemModificationByAge.t. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Both tests pass OK >Signed-off-by: Marc Véron <veron@veron.ch> >--- > t/db_dependent/Accounts.t | 4 +--- > t/db_dependent/Items/AutomaticItemModificationByAge.t | 16 ++++++++-------- > 2 files changed, 9 insertions(+), 11 deletions(-) > >diff --git a/t/db_dependent/Accounts.t b/t/db_dependent/Accounts.t >index 0fb71f2..fb0ffb7 100644 >--- a/t/db_dependent/Accounts.t >+++ b/t/db_dependent/Accounts.t >@@ -52,9 +52,7 @@ my $schema = Koha::Database->new->schema; > $schema->storage->txn_begin; > my $dbh = C4::Context->dbh; > >-# this test needs a MPL branch; also create another one >-my $builder = t::lib::TestBuilder->new(); >-$builder->build({ source => 'Branch', value => { branchcode => 'MPL' }}); >+my $builder = t::lib::TestBuilder->new; > my $library = $builder->build({ source => 'Branch' }); > > $dbh->do(q|DELETE FROM accountlines|); >diff --git a/t/db_dependent/Items/AutomaticItemModificationByAge.t b/t/db_dependent/Items/AutomaticItemModificationByAge.t >index 6d7abe2..05a92ad 100644 >--- a/t/db_dependent/Items/AutomaticItemModificationByAge.t >+++ b/t/db_dependent/Items/AutomaticItemModificationByAge.t >@@ -17,11 +17,11 @@ my $dbh = C4::Context->dbh; > $dbh->{AutoCommit} = 0; > $dbh->{RaiseError} = 1; > >-# this test assumes a CPL branch > my $builder = t::lib::TestBuilder->new; >-if( !$builder->schema->resultset('Branch')->find('CPL') ) { >- $builder->build( { source => 'Branch', value => { branchcode => 'CPL' }}); >-} >+ >+# create two branches >+my $library = $builder->build( { source => 'Branch' })->{branchcode}; >+my $library2 = $builder->build( { source => 'Branch' })->{branchcode}; > > $dbh->do(q| > DELETE FROM marc_subfield_structure >@@ -44,8 +44,8 @@ my ($biblionumber, undef) = C4::Biblio::AddBiblio($record, ''); > > my ($item_bibnum, $item_bibitemnum, $itemnumber) = C4::Items::AddItem( > { >- homebranch => 'CPL', >- holdingbranch => 'CPL', >+ homebranch => $library, >+ holdingbranch => $library, > new_status => 'new_value', > ccode => 'FIC', > }, >@@ -194,7 +194,7 @@ is( $marc_item->subfield($tagfield, $new_tagfield), undef, q|ToggleNewStatus: Th > }, > { > field => 'items.homebranch', >- value => 'CPL', >+ value => $library, > }, > ], > substitutions => [ >@@ -248,7 +248,7 @@ is( $modified_item->{new_status}, 'new_value', q|ToggleNewStatus: conditions mul > }, > { > field => 'items.homebranch', >- value => 'MPL|CPL', >+ value => "$library|$library2", > }, > ], > substitutions => [ >-- >1.7.10.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 16607
:
51857
|
51873
|
52302
|
52303
|
52338