Bugzilla – Attachment 155833 Details for
Bug 12532
Copy guarantee email to guarantor (or redirect if guarantee has no email set)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12532: (QA follow-up) Remove defunkt test
Bug-12532-QA-follow-up-Remove-defunkt-test.patch (text/plain), 3.57 KB, created by
Martin Renvoize (ashimema)
on 2023-09-18 15:37:55 UTC
(
hide
)
Description:
Bug 12532: (QA follow-up) Remove defunkt test
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-09-18 15:37:55 UTC
Size:
3.57 KB
patch
obsolete
>From 1a733cdf077f7ef184b8b37eedf56530c87a7c94 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 18 Sep 2023 14:04:11 +0100 >Subject: [PATCH] Bug 12532: (QA follow-up) Remove defunkt test > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/db_dependent/Members.t | 60 +++++++++------------------------------- > 1 file changed, 13 insertions(+), 47 deletions(-) > >diff --git a/t/db_dependent/Members.t b/t/db_dependent/Members.t >index 527c28b0948..7dceafd1bba 100755 >--- a/t/db_dependent/Members.t >+++ b/t/db_dependent/Members.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 57; >+use Test::More tests => 50; > use Test::MockModule; > use Test::Exception; > >@@ -101,55 +101,21 @@ ok ( $changedmember->{firstname} eq $CHANGED_FIRSTNAME && > , "Member Changed") > or diag("Mismatching member details: ".Dumper($member, $changedmember)); > >-# Test notice_email_address >-# Add Guarantor for testing >-my $GUARANTOR_EMAIL = "Robert\@email.com"; >+# Add a new borrower > %data = ( >- cardnumber => "2997924548", >- firstname => "Robert", >- surname => "Tables", >+ cardnumber => "123456789", >+ firstname => "Tomasito", >+ surname => "None", > categorycode => $patron_category->{categorycode}, >- branchcode => $BRANCHCODE, >- dateofbirth => '', >- dateexpiry => '9999-12-31', >- userid => 'bobbytables', >- email => $GUARANTOR_EMAIL >-); >- >-$addmem=Koha::Patron->new(\%data)->store->borrowernumber; >-ok($addmem, "Koha::Patron->store()"); >- >-my $patron_guarantor = Koha::Patrons->find( { cardnumber => (\%data)->{'cardnumber'} } ) >- or BAIL_OUT("Cannot read member with card (\%data)->{'cardnumber'}"); >-my $member_guarantor = $patron_guarantor->unblessed; >- >-my %data2 = ( >- guarantor_id => $member_guarantor->{borrowernumber}, >- guarantee_id => $member->{borrowernumber}, >- relationship => "father" >+ branchcode => $library2->{branchcode}, >+ dateofbirth => '', >+ debarred => '', >+ dateexpiry => '', >+ dateenrolled => '', > ); >-Koha::Patron::Relationship->new(\%data2)->store; >- >-$member = Koha::Patrons->find( { cardnumber => $CARDNUMBER } ); >-t::lib::Mocks::mock_preference( 'RedirectGuaranteeEmail', '0' ); >-t::lib::Mocks::mock_preference( 'EmailFieldPrimary', 'OFF' ); >-C4::Context->clear_syspref_cache(); >- >-my $notice_email = $member->notice_email_address; >-is ($notice_email, $EMAIL, "notice_email_address returns correct value when EmailFieldPrimary is off"); >- >-t::lib::Mocks::mock_preference( 'EmailFieldPrimary', 'emailpro' ); >-C4::Context->clear_syspref_cache(); >- >-$notice_email = $member->notice_email_address; >-is ($notice_email, $EMAILPRO, "notice_email_address returns correct value when EmailFieldPrimary is emailpro"); >- >-t::lib::Mocks::mock_preference( 'EmailFieldPrimary', 'OFF' ); >-t::lib::Mocks::mock_preference( 'RedirectGuaranteeEmail', '1' ); >-C4::Context->clear_syspref_cache(); >-$notice_email = $member->notice_email_address; >-is ($notice_email, $EMAIL . ", " . $GUARANTOR_EMAIL, "notice_email_address returns correct value when RedirectGuaranteeEmail is enabled"); >- >+my $borrowernumber = Koha::Patron->new( \%data )->store->borrowernumber; >+$patron = Koha::Patrons->find( $borrowernumber ); >+my $borrower = $patron->unblessed; > is( $borrower->{dateofbirth}, undef, 'Koha::Patron->store should undef dateofbirth if empty string is given'); > is( $borrower->{debarred}, undef, 'Koha::Patron->store should undef debarred if empty string is given'); > isnt( $borrower->{dateexpiry}, '0000-00-00', 'Koha::Patron->store should not set dateexpiry to 0000-00-00 if empty string is given'); >-- >2.41.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 12532
:
29510
|
30747
|
35313
|
36752
|
39787
|
39925
|
48645
|
53649
|
53689
|
53690
|
53699
|
53700
|
55985
|
56052
|
56053
|
59445
|
59446
|
59447
|
63197
|
64802
|
64824
|
67115
|
68340
|
70865
|
72064
|
72617
|
75099
|
77606
|
80313
|
85134
|
85135
|
87815
|
87816
|
88208
|
88209
|
88210
|
88211
|
88212
|
88213
|
88295
|
88296
|
114455
|
114456
|
114457
|
114458
|
114459
|
114460
|
114461
|
131091
|
131092
|
131093
|
131094
|
149233
|
150071
|
150208
|
150217
|
150240
|
150256
|
151028
|
151029
|
154854
|
154855
|
154856
|
154857
|
155036
|
155037
|
155828
|
155829
|
155830
|
155831
|
155832
|
155833
|
155834
|
155835
|
155836
|
155837
|
155873
|
155874
|
155875
|
155876
|
155877
|
155878
|
155879
|
155880
|
155881
|
155882
|
155883
|
155886
|
155934
|
155935
|
155936
|
155937
|
155938
|
155939
|
155940
|
155941
|
155942
|
155943
|
155944
|
155945
|
155946