Bugzilla – Attachment 97135 Details for
Bug 23974
hours_between and days_between lack tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23974: Test Notes
Bug-23974-Test-Notes.patch (text/plain), 1.87 KB, created by
Tomás Cohen Arazi (tcohen)
on 2020-01-09 19:05:21 UTC
(
hide
)
Description:
Bug 23974: Test Notes
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2020-01-09 19:05:21 UTC
Size:
1.87 KB
patch
obsolete
>From e3513eed93234463b078f3f2dab64d29d4bef3ce Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 29 Nov 2019 17:09:06 +0000 >Subject: [PATCH] Bug 23974: Test Notes > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/db_dependent/Calendar.t | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Calendar.t b/t/db_dependent/Calendar.t >index 22f481c5b7..2944e81fff 100644 >--- a/t/db_dependent/Calendar.t >+++ b/t/db_dependent/Calendar.t >@@ -203,7 +203,7 @@ subtest 'hours_between | days_between' => sub { > > my ( $diff_hours, $diff_days ); > >- # Between 5th and 6th >+ # Between 5th and 6th (This case should never happen in real code, one cannot return on a closed day) > $diff_hours = $calendar->hours_between( $now, $nov_6 )->hours; > is( $diff_hours, 0 * 24, '' ); # FIXME Is this really should be 0? > $diff_days = $calendar->days_between( $now, $nov_6)->delta_days; >@@ -240,9 +240,9 @@ subtest 'hours_between | days_between' => sub { > my ( $diff_hours, $diff_days ); > > # Between 5th and 5th (Same day short hours loan) >- # No test - one cannot issue on a holiday and we do not yet record opening hours to take those into account >+ # No test - Tested above as 5th is an open day > >- # Between 5th and 6th >+ # Between 5th and 6th (This case should never happen in real code, one cannot return on a closed day) > my $duration = $calendar->hours_between( $now, $nov_6->clone->subtract(hours => 3) ); > is( $duration->hours, abs(0 * 24 - 3), '' ); # FIXME $duration->hours always return a abs > is( $duration->is_negative, 1, ); # FIXME Do really test for that case in our calls to hours_between? >-- >2.24.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 23974
:
95062
|
95063
|
95064
|
95065
|
95210
|
95211
|
95212
|
95213
|
95214
|
95889
|
95890
|
95891
|
95893
|
95894
|
95895
|
95896
|
96778
|
96779
|
96780
|
96781
|
96782
|
96783
|
96784
|
96785
|
96786
|
97129
|
97130
|
97131
|
97132
|
97133
|
97134
| 97135 |
97136
|
97137