]> git.koha-community.org Git - koha.git/commit
Bug 21355: Prevent GetDailyQuote.t to fail when run after 23:00
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Sat, 15 Sep 2018 18:24:32 +0000 (11:24 -0700)
committerNick Clemens <nick@bywatersolutions.com>
Sat, 15 Sep 2018 21:19:30 +0000 (21:19 +0000)
commitca887754ead4d6207811d751229c4a4dbcf4af80
tree58da25a16f44a11ca937e4b436476a57708015e9
parentb29c4e2bf9562c47b525b2b0644fb48db7853df2
Bug 21355: Prevent GetDailyQuote.t to fail when run after 23:00

Tests will fail (Jenkins run #554) if run after 23:00

 #   Failed test 'Id is correct'
 #   at t/db_dependent/Koha/GetDailyQuote.t line 72.
 #          got: 6
 #     expected: 8

 #   Failed test 'Timestamp 2018-09-15 00:44:46 is correct'
 #   at t/db_dependent/Koha/GetDailyQuote.t line 74.
 #          got: '2018-09-14 23:44:46'
 #     expected: '2018-09-15 00:44:46'
 # Looks like you failed 2 tests of 12.
 [23:44:46] t/db_dependent/Koha/GetDailyQuote.t
 Dubious, test returned 2 (wstat 512, 0x200)

Adding only 1 second will hugely reduce the risk of failure here.

It also updates a useless test (column 'quote' does not exist)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Tested:
- Run:
  $ sudo date -s 2018-09-15T23:10:00
  $ kshell
 k$ prove t/db_dependent/Koha/GetDailyQuote.t
=> FAIL: Tests fail as patch author mentions
- Apply the patch
 k$ prove t/db_dependent/Koha/GetDailyQuote.t
=> SUCCESS: Tests pass!

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
t/db_dependent/Koha/GetDailyQuote.t