Bugzilla – Attachment 66766 Details for
Bug 15336
Script for merging vendors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15336 - Fix unit tests (t/Bookseller.t)
Bug-15336---Fix-unit-tests-tBooksellert.patch (text/plain), 2.02 KB, created by
Kyle M Hall (khall)
on 2017-09-01 16:38:58 UTC
(
hide
)
Description:
Bug 15336 - Fix unit tests (t/Bookseller.t)
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2017-09-01 16:38:58 UTC
Size:
2.02 KB
patch
obsolete
>From f872d3387ce8975d1930b677758e999f28b00f46 Mon Sep 17 00:00:00 2001 >From: Alex Arnaud <alex.arnaud@biblibre.com> >Date: Wed, 15 Mar 2017 16:03:53 +0000 >Subject: [PATCH] Bug 15336 - Fix unit tests (t/Bookseller.t) >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > t/Bookseller.t | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > >diff --git a/t/Bookseller.t b/t/Bookseller.t >index 6d6aab3..df724cd 100755 >--- a/t/Bookseller.t >+++ b/t/Bookseller.t >@@ -47,12 +47,12 @@ my $item1 = create('Item', $booksellerid1); > > my $subscription = create('Subscription', $booksellerid1); > >-my $bookseller = Koha::Acquisition::Bookseller->fetch({id => $booksellerid1}); >+my $bookseller = Koha::Acquisition::Booksellers->find( $booksellerid1 ); > >-my ($error, $result) = $bookseller->merge_to(345876876); >-is($error, "Unknown target bookseller number: 345876876", 'Merge to unknown bookseller return an error' ); >+my $result = eval{ $bookseller->merge_with(345876876); }; >+like($@, qr/Unknown target bookseller number: 345876876/, 'Merge with unknown bookseller should die.'); > >-($error, $result) = $bookseller->merge_to($booksellerid2); >+$result = $bookseller->merge_with($booksellerid2); > my $expected_result = { > Aqbasketgroup => [$bg1->{id}, $bg2->{id}], > Aqbasket => [$basket1->{basketno}, $basket2->{basketno}], >@@ -78,7 +78,7 @@ is(GetBasket($basket2->{basketno})->{'booksellerid'}, $booksellerid2, 'Basket 2 > > is(GetContract({contractnumber => $contract->{contractnumber}})->{'booksellerid'}, $booksellerid2, 'Basket 1 has bookseller 2'); > >-is(C4::Bookseller::Contact->fetch($contact->{id})->{'booksellerid'}, $booksellerid2, 'Contact 1 has booksellerid 2'); >+is(Koha::Acquisition::Bookseller::Contacts->find( $contact->{id} )->booksellerid, $booksellerid2, 'Contact 1 has booksellerid 2'); > > is(GetInvoice($invoice->{invoiceid})->{'booksellerid'}, $booksellerid2, 'Invoice has bookseller 2'); > >-- >2.10.2
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 15336
:
45521
|
45530
|
45607
|
45777
|
49313
|
61070
|
61071
|
61104
|
61105
|
61108
|
61109
|
64595
|
66765
|
66766
|
66767
|
68676
|
72023
|
72734
|
73078