Bugzilla – Attachment 106016 Details for
Bug 24159
Allow daysMode for calculating due and renewal dates to be set at the circulation rules level
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24159: Adjust tests
Bug-24159-Adjust-tests.patch (text/plain), 2.96 KB, created by
Martin Renvoize (ashimema)
on 2020-06-18 14:56:31 UTC
(
hide
)
Description:
Bug 24159: Adjust tests
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-06-18 14:56:31 UTC
Size:
2.96 KB
patch
obsolete
>From 50592a1b265b656ef1d4fa679c54fee46f654348 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 28 Feb 2020 14:28:33 +0100 >Subject: [PATCH] Bug 24159: Adjust tests > >Sponsored-by: Institute of Technology Carlow >Signed-off-by: Simon Perry <simon.perry@itcarlow.ie> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/Calendar.t | 33 ++++----------------------------- > t/db_dependent/Calendar.t | 2 +- > 2 files changed, 5 insertions(+), 30 deletions(-) > >diff --git a/t/Calendar.t b/t/Calendar.t >index e390696a44..b3dc02ffaf 100755 >--- a/t/Calendar.t >+++ b/t/Calendar.t >@@ -207,15 +207,7 @@ my $holiday_for_another_branch = DateTime->new( > > { ## 'Datedue' tests > >- $module_context->unmock('preference'); >- $module_context->mock( >- 'preference', >- sub { >- return 'Datedue'; >- } >- ); >- >- $cal = Koha::Calendar->new( branchcode => 'MPL' ); >+ $cal = Koha::Calendar->new( branchcode => 'MPL', days_mode => 'Datedue' ); > > is($cal->addDate( $dt, $one_day_dur, 'days' ), # tuesday > dt_from_string('2012-07-05','iso'), >@@ -246,15 +238,7 @@ my $holiday_for_another_branch = DateTime->new( > > { ## 'Calendar' tests' > >- $module_context->unmock('preference'); >- $module_context->mock( >- 'preference', >- sub { >- return 'Calendar'; >- } >- ); >- >- $cal = Koha::Calendar->new( branchcode => 'MPL' ); >+ $cal = Koha::Calendar->new( branchcode => 'MPL', days_mode => 'Calendar' ); > > $dt = dt_from_string('2012-07-03','iso'); > >@@ -281,15 +265,8 @@ my $holiday_for_another_branch = DateTime->new( > > > { ## 'Days' tests >- $module_context->unmock('preference'); >- $module_context->mock( >- 'preference', >- sub { >- return 'Days'; >- } >- ); > >- $cal = Koha::Calendar->new( branchcode => 'MPL' ); >+ $cal = Koha::Calendar->new( branchcode => 'MPL', days_mode => 'Days' ); > > $dt = dt_from_string('2012-07-03','iso'); > >@@ -324,11 +301,9 @@ my $holiday_for_another_branch = DateTime->new( > } > > subtest 'days_mode parameter' => sub { >- plan tests => 2; >+ plan tests => 1; > > t::lib::Mocks::mock_preference('useDaysMode', 'Days'); >- my $cal = Koha::Calendar->new( branchcode => 'CPL' ); >- is( $cal->{days_mode}, 'Days', q|If not set, days_mode defaults to syspref's value|); > > $cal = Koha::Calendar->new( branchcode => 'CPL', days_mode => 'Calendar' ); > is( $cal->{days_mode}, 'Calendar', q|If set, days_mode is correctly set|); >diff --git a/t/db_dependent/Calendar.t b/t/db_dependent/Calendar.t >index 0cd6f2a063..220f81f122 100644 >--- a/t/db_dependent/Calendar.t >+++ b/t/db_dependent/Calendar.t >@@ -52,7 +52,7 @@ my $holiday = $builder->build( > } > ); > >-my $calendar = Koha::Calendar->new( branchcode => $library->branchcode ); >+my $calendar = Koha::Calendar->new( branchcode => $library->branchcode, days_mode => 'Calendar' ); > > subtest 'days_forward' => sub { > >-- >2.20.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 24159
:
99758
|
99759
|
99760
|
99761
|
99762
|
100608
|
100609
|
100610
|
100611
|
100612
|
100613
|
100614
|
100615
|
101053
|
101054
|
101556
|
101649
|
101698
|
102009
|
102148
|
102303
|
102554
|
102555
|
102556
|
102557
|
102558
|
102559
|
102560
|
102561
|
102562
|
102563
|
104197
|
104198
|
104199
|
104200
|
104201
|
104202
|
104203
|
104204
|
106007
|
106008
|
106013
|
106014
|
106015
| 106016 |
106017
|
106018
|
106019
|
106020
|
106021
|
106022