Bugzilla – Attachment 110276 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.59 KB, created by
Martin Renvoize (ashimema)
on 2020-09-17 16:21:42 UTC
(
hide
)
Description:
Bug 25757: Add unit tests for item relation
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-09-17 16:21:42 UTC
Size:
1.59 KB
patch
obsolete
>From 7a9f974993c48e50fc837ca7646335823dd3cf7f 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> >--- > 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.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