Bugzilla – Attachment 110298 Details for
Bug 25757
Add a Koha::Item::Transfer->transit method
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25757: Add unit tests for item relation
Bug-25757-Add-unit-tests-for-item-relation.patch (text/plain), 1.65 KB, created by
Katrin Fischer
on 2020-09-17 20:53:35 UTC
(
hide
)
Description:
Bug 25757: Add unit tests for item relation
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-09-17 20:53:35 UTC
Size:
1.65 KB
patch
obsolete
>From 3ee9e0753f57106efc6f5d93f68aa07870a1b0ef Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 16 Jun 2020 12:01:49 +0100 >Subject: [PATCH] Bug 25757: Add unit tests for item relation > >Test plan >1/ Run the unit test > >Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > t/db_dependent/Koha/Item/Transfer.t | 24 +++++++++++++++++++++++- > 1 file changed, 23 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Item/Transfer.t b/t/db_dependent/Koha/Item/Transfer.t >index 37b5fbae75..4b094d80cb 100644 >--- a/t/db_dependent/Koha/Item/Transfer.t >+++ b/t/db_dependent/Koha/Item/Transfer.t >@@ -23,12 +23,34 @@ use Koha::Database; > > use t::lib::TestBuilder; > >-use Test::More tests => 1; >+use Test::More tests => 2; > use Test::Exception; > > my $schema = Koha::Database->new->schema; > my $builder = t::lib::TestBuilder->new; > >+subtest 'item relation tests' => sub { >+ plan tests => 2; >+ >+ $schema->storage->txn_begin; >+ >+ my $item = $builder->build_sample_item(); >+ my $transfer = $builder->build_object( >+ { >+ class => 'Koha::Item::Transfers', >+ value => { >+ itemnumber => $item->itemnumber, >+ } >+ } >+ ); >+ >+ my $transfer_item = $transfer->item; >+ is( ref( $transfer_item ), 'Koha::Item', 'Koha::Item::Transfer->item should return a Koha::Item' ); >+ is( $transfer_item->itemnumber, $item->itemnumber, 'Koha::Item::Transfer->item should return the correct item' ); >+ >+ $schema->storage->txn_rollback; >+}; >+ > subtest 'transit tests' => sub { > plan tests => 7; > >-- >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 25757
:
105900
|
105901
|
105902
|
107241
|
107242
|
107243
|
107296
|
107297
|
107298
|
110274
|
110275
|
110276
|
110296
|
110297
|
110298
|
110507
|
110508
|
110509
|
116547
|
116548
|
116549
|
117580
|
117581
|
117582