Bugzilla – Attachment 102558 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.89 KB, created by
PTFS Europe Sandboxes
on 2020-04-08 11:47:52 UTC
(
hide
)
Description:
Bug 24159: Adjust tests
Filename:
MIME Type:
Creator:
PTFS Europe Sandboxes
Created:
2020-04-08 11:47:52 UTC
Size:
2.89 KB
patch
obsolete
>From b48feffa2558d7e3e70fc0c234d9eecbb4dd6b63 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> >--- > 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.11.0
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