Bugzilla – Attachment 130752 Details for
Bug 29495
Issue link is lost in return claims when using 'MarkLostItemsAsReturned'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[21.05.x] Bug 29495: Unit Tests
2105x-Bug-29495-Unit-Tests.patch (text/plain), 2.91 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-02-17 15:23:01 UTC
(
hide
)
Description:
[21.05.x] Bug 29495: Unit Tests
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-02-17 15:23:01 UTC
Size:
2.91 KB
patch
obsolete
>From 1c4018573f9c60c25e7c3c625a4cbf920c3da985 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 22 Nov 2021 16:30:13 +0000 >Subject: [PATCH] [21.05.x] Bug 29495: Unit Tests > >Test plan >1. Run updated tests prior to applying new patches.. pass >2. Run updated tests after applying new patches.. pass > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/db_dependent/Koha/Checkouts/ReturnClaim.t | 33 +++++++++++++++------ > 1 file changed, 24 insertions(+), 9 deletions(-) > >diff --git a/t/db_dependent/Koha/Checkouts/ReturnClaim.t b/t/db_dependent/Koha/Checkouts/ReturnClaim.t >index cb31b10f1c..57a0514b4f 100755 >--- a/t/db_dependent/Koha/Checkouts/ReturnClaim.t >+++ b/t/db_dependent/Koha/Checkouts/ReturnClaim.t >@@ -30,7 +30,7 @@ my $builder = t::lib::TestBuilder->new; > > subtest "store() tests" => sub { > >- plan tests => 11; >+ plan tests => 13; > > $schema->storage->txn_begin; > >@@ -59,23 +59,38 @@ subtest "store() tests" => sub { > } > )->store } > 'Koha::Exceptions::Checkouts::ReturnClaims::NoCreatedBy', >- 'Exception thrown correctly'; >+ 'Exception thrown if no created_by passed on creation'; > >- my $nullified_created_by = $builder->build_object( >+ my $old_checkout = $builder->build_object( > { >- class => 'Koha::Checkouts::ReturnClaims', >+ class => 'Koha::Old::Checkouts', > value => { >- created_by => undef >+ borrowernumber => $patron->borrowernumber, >+ itemnumber => $item->itemnumber, >+ branchcode => $patron->branchcode > } > } > ); > >- is( $nullified_created_by->created_by, undef, 'Is undef' ); >- ok( $nullified_created_by->in_storage, 'In storage' ); >+ my $nullable_created_by = Koha::Checkouts::ReturnClaim->new( >+ { >+ issue_id => $old_checkout->id, >+ itemnumber => $old_checkout->itemnumber, >+ borrowernumber => $old_checkout->borrowernumber, >+ notes => 'Some notes', >+ created_by => $librarian->borrowernumber >+ } >+ )->store; >+ is( $nullable_created_by->created_by, $librarian->borrowernumber, 'Claim created with created_by set' ); >+ ok( $nullable_created_by->in_storage, 'In storage' ); >+ >+ $nullable_created_by->created_by(undef)->store(); >+ is( $nullable_created_by->created_by, undef, 'Deletion was deleted' ); >+ ok( $nullable_created_by->in_storage, 'In storage' ); > is( >- ref($nullified_created_by->notes('Some other note')->store), >+ ref($nullable_created_by->notes('Some other note')->store), > 'Koha::Checkouts::ReturnClaim', >- 'No exception, store success' >+ 'Subsequent store succeeds after created_by has been unset' > ); > > is( Koha::Checkouts::ReturnClaims->search({ issue_id => $checkout->id })->count, 0, 'No claims stored' ); >-- >2.32.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 29495
:
127711
|
127712
|
127713
|
127714
|
127765
|
127766
|
127767
|
127768
|
127769
|
127809
|
127810
|
127811
|
127812
|
127813
|
127937
|
127938
|
127939
|
127940
|
127941
|
127942
|
127943
|
127944
|
129105
|
129106
|
129107
|
129109
|
129110
|
129111
|
129112
|
129113
|
129547
|
129575
|
129582
|
130460
|
130461
|
130462
|
130463
|
130464
|
130465
|
130466
|
130467
| 130752 |
130753
|
130754
|
130755
|
130756
|
130757
|
130758