Bugzilla – Attachment 74801 Details for
Bug 19204
Fines in days restriction calculation is not taking calendar into account
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19204: Add tests for new days_mode parameter
Bug-19204-Add-tests-for-new-daysmode-parameter.patch (text/plain), 1.69 KB, created by
Tomás Cohen Arazi (tcohen)
on 2018-04-24 12:42:15 UTC
(
hide
)
Description:
Bug 19204: Add tests for new days_mode parameter
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2018-04-24 12:42:15 UTC
Size:
1.69 KB
patch
obsolete
>From 34c84eeb4f003927451309e7e202585de7c8d430 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 23 Apr 2018 10:37:48 -0300 >Subject: [PATCH] Bug 19204: Add tests for new days_mode parameter > >Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/Calendar.t | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > >diff --git a/t/Calendar.t b/t/Calendar.t >index 1c3f194973..e390696a44 100755 >--- a/t/Calendar.t >+++ b/t/Calendar.t >@@ -25,11 +25,13 @@ use DateTime::Duration; > use Koha::Caches; > use Koha::DateUtils; > >+use t::lib::Mocks; >+ > use Module::Load::Conditional qw/check_install/; > > BEGIN { > if ( check_install( module => 'Test::DBIx::Class' ) ) { >- plan tests => 38; >+ plan tests => 39; > } else { > plan skip_all => "Need Test::DBIx::Class" > } >@@ -321,6 +323,17 @@ my $holiday_for_another_branch = DateTime->new( > is ( $cal->is_holiday($holiday_for_another_branch), 1, 'Holiday defined for CPL should be defined as an holiday' ); > } > >+subtest 'days_mode parameter' => sub { >+ plan tests => 2; >+ >+ 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|); >+}; >+ > END { > $cache->clear_from_cache( 'single_holidays' ) ; > $cache->clear_from_cache( 'exception_holidays' ) ; >-- >2.17.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 19204
:
74726
|
74727
|
74728
|
74730
|
74733
|
74734
|
74735
|
74736
|
74777
|
74778
|
74779
|
74780
|
74798
|
74799
|
74800
| 74801