Bug 14977 - Remove C4::Dates from files t/db_dependent/*.t
Summary: Remove C4::Dates from files t/db_dependent/*.t
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Marc Véron
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 14870
  Show dependency treegraph
 
Reported: 2015-10-07 22:11 UTC by Marc Véron
Modified: 2016-06-21 21:40 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 14977 - Remove C4::Dates from files t/db_dependent/*.t (5.56 KB, patch)
2015-10-07 22:17 UTC, Marc Véron
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 14977 - Remove C4::Dates from files t/db_dependent/*.t (5.71 KB, patch)
2015-10-26 15:45 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 14977: followup to fix NewsChanell.t (1.68 KB, patch)
2015-10-26 15:46 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 14977: followup to fix NewsChanell.t (1.86 KB, patch)
2015-10-26 16:02 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 14977 - Followup to fix issue with NewsChannels.t (1.69 KB, patch)
2015-10-27 19:12 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 14977 - Remove C4::Dates from files t/db_dependent/*.t (5.77 KB, patch)
2015-10-28 11:03 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14977 - Followup to fix issue with NewsChannels.t (1.76 KB, patch)
2015-10-28 11:03 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Véron 2015-10-07 22:11:35 UTC
This patch removes C4::Dates from following files:

-  t/db_dependent/Budgets.t
-  t/db_dependent/Holds.t
-  t/db_dependent/Koha_template_plugin_KohaDates.t
-  t/db_dependent/Log.t
-  t/db_dependent/NewsChannels.t
Comment 1 Marc Véron 2015-10-07 22:17:29 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2015-10-23 09:31:38 UTC
Still applies
Comment 3 Bernardo Gonzalez Kriegel 2015-10-26 15:45:24 UTC Comment hidden (obsolete)
Comment 4 Bernardo Gonzalez Kriegel 2015-10-26 15:46:05 UTC Comment hidden (obsolete)
Comment 5 Marc Véron 2015-10-26 16:02:03 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2015-10-27 09:03:08 UTC
The NewsChannels.t test fail for me, with and without the last patch:

With:
#   Failed test 'got back expected news item via get_opac_new - ID 1'
#   at t/db_dependent/NewsChannels.t line 90.
#     Structures begin differing at:
#          $got->{expirationdate} = '12/30/2999'
#     $expected->{expirationdate} = '30/12/2999'

#   Failed test 'got back expected news item via get_opac_new - ID 2'
#   at t/db_dependent/NewsChannels.t line 112.
#     Structures begin differing at:
#          $got->{expirationdate} = '12/31/2999'
#     $expected->{expirationdate} = '31/12/2999'
# Looks like you failed 2 tests of 10.


Without:
#   Failed test 'got back expected news item via get_opac_new - ID 1'
#   at t/db_dependent/NewsChannels.t line 90.
#     Structures begin differing at:
#          $got->{expirationdate} = '30/12/2999'
#     $expected->{expirationdate} = '2999-12-30'

#   Failed test 'got back expected news item via get_opac_new - ID 2'
#   at t/db_dependent/NewsChannels.t line 112.
#     Structures begin differing at:
#          $got->{timestamp} = '01/01/2000'
#     $expected->{timestamp} = '2000-01-01'
# Looks like you failed 2 tests of 10.
Comment 7 Marc Véron 2015-10-27 19:04:58 UTC
Comment on attachment 44010 [details] [review]
Bug 14977: followup to fix NewsChanell.t

Thanks Bernardo for the trying to fix. It helped to find out what happens.
New patch follows.
Comment 8 Marc Véron 2015-10-27 19:12:18 UTC Comment hidden (obsolete)
Comment 9 Jonathan Druart 2015-10-28 11:03:42 UTC
Created attachment 44121 [details] [review]
Bug 14977 - Remove C4::Dates from files t/db_dependent/*.t

This patch removes C4::Dates from following files:

-  t/db_dependent/Budgets.t
-  t/db_dependent/Holds.t
-  t/db_dependent/Koha_template_plugin_KohaDates.t
-  t/db_dependent/Log.t
-  t/db_dependent/NewsChannels.t

To test:
- First run all tests above
- Apply patch
- Then run tests again. The results should be the same.
  (Note: I get 2 fails with NewsChannels.t, they are the same with
   and without patch).

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

NewsChanell pass for me before patch, no after.
Followup follows :)
Rest of tests pass

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 10 Jonathan Druart 2015-10-28 11:03:45 UTC
Created attachment 44122 [details] [review]
Bug 14977 - Followup to fix issue with NewsChannels.t

The problem was that get_opac_new returns dates already syspref-formatted.

To test:
- Apply patch
- Verify that t/db_dependent/NewsChannels.t does not fail.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 11 Tomás Cohen Arazi 2015-10-29 15:05:20 UTC
Patches pushed to master.

Thanks Marc!