Bugzilla – Attachment 117582 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.79 KB, created by
Jonathan Druart
on 2021-03-03 14:29:26 UTC
(
hide
)
Description:
Bug 25757: Add unit tests for item relation
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-03-03 14:29:26 UTC
Size:
1.79 KB
patch
obsolete
>From d92c0ce22785b5032147e2bf7cf535bf6bc96aa9 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 18 Dec 2020 16:35:21 +0000 >Subject: [PATCH] Bug 25757: Add unit tests for item relation >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >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> >Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> >--- > 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 100755 >--- 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.20.1
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