Bugzilla – Attachment 74730 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.53 KB, created by
Jonathan Druart
on 2018-04-23 13:38:04 UTC
(
hide
)
Description:
Bug 19204: Add tests for new days_mode parameter
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-04-23 13:38:04 UTC
Size:
1.53 KB
patch
obsolete
>From 94a34f713adeb66088fe6766f3c65ed043993712 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 > >--- > 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.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 19204
:
74726
|
74727
|
74728
|
74730
|
74733
|
74734
|
74735
|
74736
|
74777
|
74778
|
74779
|
74780
|
74798
|
74799
|
74800
|
74801