Bugzilla – Attachment 114732 Details for
Bug 27004
Deleting a staff account who have created claims returned causes problem in the return_claims table because of a NULL value in return_claims.created_by.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27004: Regression tests
Bug-27004-Regression-tests.patch (text/plain), 1.82 KB, created by
Tomás Cohen Arazi (tcohen)
on 2020-12-29 17:42:20 UTC
(
hide
)
Description:
Bug 27004: Regression tests
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2020-12-29 17:42:20 UTC
Size:
1.82 KB
patch
obsolete
>From b81d2e0246adb2b9f8887c89fb2cfcc7def7da69 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 29 Dec 2020 14:35:27 -0300 >Subject: [PATCH] Bug 27004: Regression tests > >This patch introduces regression tests for the change in >Koha::Checkouts::ReturnClaim->store. > >To test: >1. Apply this patch >2. Run: > $ kshell > k$ prove t/db_dependent/Koha/Checkouts/ReturnClaim.t >=> FAIL: Tests fail > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/db_dependent/Koha/Checkouts/ReturnClaim.t | 19 ++++++++++++++++++- > 1 file changed, 18 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Checkouts/ReturnClaim.t b/t/db_dependent/Koha/Checkouts/ReturnClaim.t >index 7d6c3bb4cc..cb31b10f1c 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 => 8; >+ plan tests => 11; > > $schema->storage->txn_begin; > >@@ -61,6 +61,23 @@ subtest "store() tests" => sub { > 'Koha::Exceptions::Checkouts::ReturnClaims::NoCreatedBy', > 'Exception thrown correctly'; > >+ my $nullified_created_by = $builder->build_object( >+ { >+ class => 'Koha::Checkouts::ReturnClaims', >+ value => { >+ created_by => undef >+ } >+ } >+ ); >+ >+ is( $nullified_created_by->created_by, undef, 'Is undef' ); >+ ok( $nullified_created_by->in_storage, 'In storage' ); >+ is( >+ ref($nullified_created_by->notes('Some other note')->store), >+ 'Koha::Checkouts::ReturnClaim', >+ 'No exception, store success' >+ ); >+ > is( Koha::Checkouts::ReturnClaims->search({ issue_id => $checkout->id })->count, 0, 'No claims stored' ); > > my $claim = Koha::Checkouts::ReturnClaim->new( >-- >2.29.2
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 27004
:
114547
|
114573
| 114732 |
114733