Bugzilla – Attachment 182088 Details for
Bug 39832
Add $basket->vendor() method
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39832: Unit tests
Bug-39832-Unit-tests.patch (text/plain), 1.60 KB, created by
Martin Renvoize (ashimema)
on 2025-05-08 14:59:44 UTC
(
hide
)
Description:
Bug 39832: Unit tests
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-05-08 14:59:44 UTC
Size:
1.60 KB
patch
obsolete
>From 65d55f2ae441cfeabbe300ce795ef02fa2b41988 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 5 May 2025 09:14:35 -0300 >Subject: [PATCH] Bug 39832: Unit tests > >Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> >Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> >Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> >--- > t/db_dependent/Koha/Acquisition/Basket.t | 21 ++++++++++++++++++++- > 1 file changed, 20 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Acquisition/Basket.t b/t/db_dependent/Koha/Acquisition/Basket.t >index 71a392be9d3..4e3ed58ddbb 100755 >--- a/t/db_dependent/Koha/Acquisition/Basket.t >+++ b/t/db_dependent/Koha/Acquisition/Basket.t >@@ -20,7 +20,7 @@ > use Modern::Perl; > > use Test::NoWarnings; >-use Test::More tests => 14; >+use Test::More tests => 15; > use Test::Exception; > > use t::lib::TestBuilder; >@@ -445,3 +445,22 @@ subtest 'close() tests' => sub { > > $schema->storage->txn_rollback; > }; >+ >+subtest 'vendor() tests' => sub { >+ >+ plan tests => 2; >+ >+ $schema->storage->txn_begin; >+ >+ my $basket = $builder->build_object( { class => 'Koha::Acquisition::Baskets' } ); >+ my $vendor = $basket->vendor; >+ is( ref($vendor), 'Koha::Acquisition::Bookseller', 'Right object type' ); >+ my $other_vendor = $builder->build_object( { class => 'Koha::Acquisition::Booksellers' } ); >+ >+ # change the vendor >+ $basket->set( { booksellerid => $other_vendor->id } )->store()->discard_changes(); >+ >+ is( $basket->vendor->id, $other_vendor->id, 'Method returns the new vendor' ); >+ >+ $schema->storage->txn_rollback; >+}; >-- >2.49.0
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 39832
:
181911
|
181912
|
181949
|
181950
|
182060
|
182061
| 182088 |
182089