Bugzilla – Attachment 97709 Details for
Bug 23355
Add a 'cashup' process to accounts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23355: Add accountline deletion test
Bug-23355-Add-accountline-deletion-test.patch (text/plain), 2.06 KB, created by
Martin Renvoize (ashimema)
on 2020-01-22 12:45:59 UTC
(
hide
)
Description:
Bug 23355: Add accountline deletion test
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-01-22 12:45:59 UTC
Size:
2.06 KB
patch
obsolete
>From 2f4952847365d4a25614dd2cfc965d9061343200 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 22 Aug 2019 09:10:51 +0100 >Subject: [PATCH] Bug 23355: Add accountline deletion test > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > t/db_dependent/Koha/Account/Lines.t | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Koha/Account/Lines.t b/t/db_dependent/Koha/Account/Lines.t >index a2a12c16f0..667071f0a2 100755 >--- a/t/db_dependent/Koha/Account/Lines.t >+++ b/t/db_dependent/Koha/Account/Lines.t >@@ -551,9 +551,9 @@ subtest 'apply() tests' => sub { > $schema->storage->txn_rollback; > }; > >-subtest 'Keep account info when related patron, staff or item is deleted' => sub { >+subtest 'Keep account info when related patron, staff, item or cash_register is deleted' => sub { > >- plan tests => 3; >+ plan tests => 4; > > $schema->storage->txn_begin; > >@@ -566,6 +566,8 @@ subtest 'Keep account info when related patron, staff or item is deleted' => sub > value => { itemnumber => $item->itemnumber } > } > ); >+ my $register = $builder->build_object({ class => 'Koha::Cash::Registers' }); >+ > my $line = Koha::Account::Line->new( > { > borrowernumber => $patron->borrowernumber, >@@ -575,6 +577,7 @@ subtest 'Keep account info when related patron, staff or item is deleted' => sub > status => "RETURNED", > amount => 10, > interface => 'commandline', >+ register_id => $register->id > })->store; > > $issue->delete; >@@ -590,6 +593,10 @@ subtest 'Keep account info when related patron, staff or item is deleted' => sub > $line = $line->get_from_storage; > is( $line->borrowernumber, undef, "The account line should not be deleted when the related patron is delete"); > >+ $register->delete; >+ $line = $line->get_from_storage; >+ is( $line->register_id, undef, "The account line should not be deleted when the related cash register is delete"); >+ > $schema->storage->txn_rollback; > }; > >-- >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 23355
:
92941
|
92942
|
92943
|
92944
|
92945
|
92946
|
92947
|
92948
|
92949
|
92950
|
92951
|
92952
|
92953
|
97031
|
97032
|
97033
|
97034
|
97035
|
97036
|
97037
|
97038
|
97039
|
97040
|
97041
|
97043
|
97044
|
97045
|
97046
|
97047
|
97048
|
97049
|
97050
|
97051
|
97052
|
97053
|
97054
|
97077
|
97078
|
97079
|
97080
|
97081
|
97082
|
97083
|
97084
|
97085
|
97086
|
97087
|
97088
|
97089
|
97706
|
97707
|
97708
|
97709
|
97710
|
97711
|
97712
|
97713
|
97714
|
97715
|
97716
|
97784
|
97785
|
97786
|
97787
|
97788
|
97789
|
97790
|
97791
|
97792
|
97793
|
97794
|
97816
|
97817
|
97818
|
97819
|
97820
|
97821
|
97822
|
97823
|
98026
|
98027
|
98028
|
98835
|
98836
|
98837
|
98838
|
98839
|
98840
|
98841
|
98842
|
100009
|
100010
|
100011
|
100012
|
100013
|
100014
|
100015
|
100016
|
100017
|
100018
|
100019
|
100020
|
100021
|
100030
|
100090
|
101685