Bugzilla – Attachment 98207 Details for
Bug 24440
Add ->current_item_level_holds to Koha::Acquisition::Order
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24440: ->biblio tests
Bug-24440--biblio-tests.patch (text/plain), 1.70 KB, created by
David Nind
on 2020-01-31 07:05:36 UTC
(
hide
)
Description:
Bug 24440: ->biblio tests
Filename:
MIME Type:
Creator:
David Nind
Created:
2020-01-31 07:05:36 UTC
Size:
1.70 KB
patch
obsolete
>From 75510f2614b475e06eded36882a158ad9400ba5c Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 31 Jan 2020 00:27:05 -0300 >Subject: [PATCH] Bug 24440: ->biblio tests > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: David Nind <david@davidnind.com> >--- > t/db_dependent/Koha/Acquisition/Order.t | 28 +++++++++++++++++++++++++++- > 1 file changed, 27 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Acquisition/Order.t b/t/db_dependent/Koha/Acquisition/Order.t >index 6d2797bf35..aaa57910ac 100644 >--- a/t/db_dependent/Koha/Acquisition/Order.t >+++ b/t/db_dependent/Koha/Acquisition/Order.t >@@ -19,7 +19,7 @@ > > use Modern::Perl; > >-use Test::More tests => 7; >+use Test::More tests => 8; > > use t::lib::TestBuilder; > use t::lib::Mocks; >@@ -57,6 +57,32 @@ subtest 'basket() tests' => sub { > $schema->storage->txn_rollback; > }; > >+subtest 'biblio() tests' => sub { >+ >+ plan tests => 3; >+ >+ $schema->storage->txn_begin; >+ >+ my $order = $builder->build_object( >+ { >+ class => 'Koha::Acquisition::Orders', >+ value => { biblionumber => undef } >+ } >+ ); >+ >+ is( $order->biblio, undef, 'If no linked biblio, undef is returned' ); >+ >+ # Add and link a biblio to the order >+ my $biblio = $builder->build_sample_biblio(); >+ $order->set({ biblionumber => $biblio->biblionumber })->store->discard_changes; >+ >+ my $THE_biblio = $order->biblio; >+ is( ref($THE_biblio), 'Koha::Biblio', 'Returns a Koha::Biblio object' ); >+ is( $THE_biblio->biblionumber, $biblio->biblionumber, 'It is not cheating about the object' ); >+ >+ $schema->storage->txn_rollback; >+}; >+ > subtest 'store' => sub { > plan tests => 1; > >-- >2.11.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 24440
:
97467
|
97468
|
97491
|
97492
|
98194
|
98195
|
98196
|
98197
|
98205
|
98206
|
98207
|
98208
|
98237
|
98283
|
98284
|
98285
|
98286
|
98287
|
98288