Bugzilla – Attachment 114180 Details for
Bug 12388
IssueSlip output should be sorted by date_due, not timestamp
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12388: Adjust tests some more
0001-Bug-12388-Adjust-tests-some-more.patch (text/plain), 2.77 KB, created by
Emmi Takkinen
on 2020-12-04 09:16:21 UTC
(
hide
)
Description:
Bug 12388: Adjust tests some more
Filename:
MIME Type:
Creator:
Emmi Takkinen
Created:
2020-12-04 09:16:21 UTC
Size:
2.77 KB
patch
obsolete
>From 1818e1785be6b7db06df5419575de5262ac525c3 Mon Sep 17 00:00:00 2001 >From: Emmi Takkinen <emmi.takkinen@outlook.com> >Date: Fri, 20 Nov 2020 13:35:15 +0200 >Subject: [PATCH] Bug 12388: Adjust tests some more > >We should now test if issues are really sorted with >date_due. This patch adjusts test for daily loans so >that test issues have different date_due values. >Also removes some now unneeded code from IssueSlip.t. > >To test prove t/db_dependent/Members/IssueSlip.t > >Sponsored-by: Koha-Suomi Oy >--- > t/db_dependent/Members/IssueSlip.t | 16 ++++------------ > 1 file changed, 4 insertions(+), 12 deletions(-) > >diff --git a/t/db_dependent/Members/IssueSlip.t b/t/db_dependent/Members/IssueSlip.t >index ae175f92c2..3552b62f6a 100755 >--- a/t/db_dependent/Members/IssueSlip.t >+++ b/t/db_dependent/Members/IssueSlip.t >@@ -125,6 +125,7 @@ $module->mock( 'userenv', sub { { branch => $branchcode } } ); > > my $today = dt_from_string; > my $yesterday = dt_from_string->subtract_duration( DateTime::Duration->new( days => 1 ) ); >+my $tomorrow = dt_from_string->add( DateTime::Duration->new( days => 1 ) ); > > subtest 'Issue slip' => sub { > plan tests => 3; >@@ -153,20 +154,16 @@ EOS > my $today_daily_as_formatted = output_pref( $today_daily ); > my $yesterday_daily = $yesterday->clone->set( hour => 23, minute => 59 ); > my $yesterday_daily_as_formatted = output_pref( $yesterday_daily ); >+ my $tomorrow_daily_as_formatted = output_pref( $tomorrow ); > > my ( $date_due, $issue_date, $slip, $expected_slip ); >- $date_due = $today_daily; >+ $date_due = $tomorrow; > $issue_date = $today_daily->clone->subtract_duration( DateTime::Duration->new( minutes => 1 ) ); > AddIssue( $borrower, $barcode1, $date_due, undef, $issue_date ); > $date_due = $today_daily; > $issue_date = $yesterday_daily; > AddIssue( $borrower, $barcode2, $date_due, undef, $issue_date ); > >- # Set timestamps to the same value to avoid a different order >- Koha::Checkouts->search( >- { borrowernumber => $borrower->{borrowernumber} } >- )->update( { timestamp => dt_from_string } ); >- > $expected_slip = <<EOS; > Checked out: > >@@ -177,7 +174,7 @@ Date due: $today_daily_as_formatted > > Title: $title1 > Barcode: $barcode1 >-Date due: $today_daily_as_formatted >+Date due: $tomorrow_daily_as_formatted > > > Overdues: >@@ -235,11 +232,6 @@ EOS > $issue_date = $yesterday->clone; > AddIssue( $borrower, $barcode2, $date_due_in_time, undef, $issue_date ); > >- # Set timestamps to the same value to avoid a different order >- Koha::Checkouts->search( >- { borrowernumber => $borrower->{borrowernumber} } >- )->update( { timestamp => dt_from_string } ); >- > $expected_slip = <<EOS; > Checked out: > >-- >2.17.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 12388
:
41784
|
62361
|
91522
|
91766
|
102977
|
104033
|
104034
| 114180