Bugzilla – Attachment 57890 Details for
Bug 17583
Use Koha::Patron->is_expired from circulation.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17583: Add test for is_going_to _expired to be true
Bug-17583-Add-test-for-isgoingto-expired-to-be-tru.patch (text/plain), 1.42 KB, created by
Jonathan Druart
on 2016-12-02 08:31:15 UTC
(
hide
)
Description:
Bug 17583: Add test for is_going_to _expired to be true
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-12-02 08:31:15 UTC
Size:
1.42 KB
patch
obsolete
>From 2c557d27d5cd92594160a1ab09802117a4f22ffb Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Wed, 9 Nov 2016 09:59:50 +0000 >Subject: [PATCH] Bug 17583: Add test for is_going_to _expired to be true > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > t/db_dependent/Koha/Patrons.t | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Patrons.t b/t/db_dependent/Koha/Patrons.t >index 79b0835..47fdea1 100644 >--- a/t/db_dependent/Koha/Patrons.t >+++ b/t/db_dependent/Koha/Patrons.t >@@ -191,7 +191,7 @@ subtest 'is_expired' => sub { > }; > > subtest 'is_going_to_expired' => sub { >- plan tests => 8; >+ plan tests => 9; > my $patron = $builder->build({ source => 'Borrower' }); > $patron = Koha::Patrons->find( $patron->{borrowernumber} ); > $patron->dateexpiry( undef )->store; >@@ -223,6 +223,10 @@ subtest 'is_going_to_expired' => sub { > $patron->dateexpiry( dt_from_string->add( days => 20 ) )->store; > is( $patron->is_going_to_expired, 0, 'Patron should not be considered going to expire if dateexpiry is 20 days before and pref is 10'); > >+ t::lib::Mocks::mock_preference('NotifyBorrowerDeparture', 20); >+ $patron->dateexpiry( dt_from_string->add( days => 10 ) )->store; >+ is( $patron->is_going_to_expired, 1, 'Patron should be considered going to expire if dateexpiry is 10 days before and pref is 20'); >+ > $patron->delete; > }; > >-- >2.9.3
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 17583
:
57329
|
57330
|
57334
|
57364
|
57380
|
57384
|
57387
|
57488
|
57523
|
57524
|
57525
|
57526
|
57527
|
57528
|
57888
|
57889
|
57890
|
57891
|
57892
|
57893
|
57914
|
57915
|
57916
|
57917
|
57918
|
57919
|
57920