Bugzilla – Attachment 61104 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), 1.95 KB, created by
Alex Arnaud
on 2017-03-15 16:04:20 UTC
(
hide
)
Description:
Bug 15336 - Fix unit tests (t/Bookseller.t)
Filename:
MIME Type:
Creator:
Alex Arnaud
Created:
2017-03-15 16:04:20 UTC
Size:
1.95 KB
patch
obsolete
>From 263eaea472d36b2cc6bfa4453959634bb1748bf4 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) > >--- > t/Bookseller.t | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > >diff --git a/t/Bookseller.t b/t/Bookseller.t >index 6d6aab3..c12184b 100755 >--- a/t/Bookseller.t >+++ b/t/Bookseller.t >@@ -47,12 +47,13 @@ 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 ($error, $result) = eval{ $bookseller->merge_with(345876876); }; >+#is($error, "Unknown target bookseller number: 345876876", 'Merge to unknown bookseller return an error' ); >+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 +79,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.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 15336
:
45521
|
45530
|
45607
|
45777
|
49313
|
61070
|
61071
|
61104
|
61105
|
61108
|
61109
|
64595
|
66765
|
66766
|
66767
|
68676
|
72023
|
72734
|
73078