Bugzilla – Attachment 59727 Details for
Bug 18009
IssueSlip.t test fails if launched between 00:00 and 00:59
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18009 - IssueSlip.t test fails if launched between 00:00 and 00:59
Bug-18009---IssueSlipt-test-fails-if-launched-betw.patch (text/plain), 2.32 KB, created by
Jonathan Druart
on 2017-02-01 09:40:13 UTC
(
hide
)
Description:
Bug 18009 - IssueSlip.t test fails if launched between 00:00 and 00:59
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-02-01 09:40:13 UTC
Size:
2.32 KB
patch
obsolete
>From 411f1ea960123135051712c81467cffae785ac33 Mon Sep 17 00:00:00 2001 >From: Mason James <mtj@kohaaloha.com> >Date: Sun, 29 Jan 2017 00:47:20 +1300 >Subject: [PATCH] Bug 18009 - IssueSlip.t test fails if launched between 00:00 > and 00:59 > >to test patch... > >1/ set date between 00:00 and 00:59 >$ sudo date -s 'Sun Jan 29 00:41:55 NZDT 2017' > >2/ run prove, see fail >$ prove -v t/db_dependent/Members/IssueSlip.t >... >t/db_dependent/Members/IssueSlip.t (Wstat: 65280 Tests: 1 Failed: 0) >Result: FAIL > >3/ apply patch > >4/ run prove, see pass >$ prove -v t/db_dependent/Members/IssueSlip.t >... >All tests successful. >Result: PASS > >NOTE: for code obscurity you could have also done a modulus 24. ;) > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > t/db_dependent/Members/IssueSlip.t | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Members/IssueSlip.t b/t/db_dependent/Members/IssueSlip.t >index 23340fe..c8135bc 100644 >--- a/t/db_dependent/Members/IssueSlip.t >+++ b/t/db_dependent/Members/IssueSlip.t >@@ -250,7 +250,7 @@ EOS > $date_due_in_time_as_formatted = output_pref( $date_due_in_time ); > $issue_date = $date_due_in_time->clone->subtract_duration( DateTime::Duration->new( minutes => 1 ) ); > AddIssue( $borrower, $barcode1, $date_due_in_time, undef, $issue_date ); >- $date_due_in_late = $today->clone->set(hour => $today->hour - 1); >+ $date_due_in_late = $today->clone->subtract( hours => 1 ); > $date_due_in_late_as_formatted = output_pref( $date_due_in_late ); > $issue_date = $yesterday->clone; > AddIssue( $borrower, $barcode2, $date_due_in_late, undef, $issue_date ); >@@ -374,7 +374,7 @@ EOS > $date_due_in_time_as_formatted = output_pref( $date_due_in_time ); > $issue_date = $date_due_in_time->clone->subtract_duration( DateTime::Duration->new( minutes => 1 ) ); > AddIssue( $borrower, $barcode1, $date_due_in_time, undef, $issue_date ); >- $date_due_in_late = $today->clone->set(hour => $today->hour - 1); >+ $date_due_in_late = $today->clone->subtract( hours => 1 ); > $date_due_in_late_as_formatted = output_pref( $date_due_in_late ); > $issue_date = $yesterday->clone; > AddIssue( $borrower, $barcode2, $date_due_in_late, undef, $issue_date ); >-- >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 18009
:
59629
|
59695
| 59727