Commit graph

7 commits

Author SHA1 Message Date
Tom Hughes
b5f06e06c1 Fix rubocop Rails/TimeZone warnings 2022-03-01 22:55:10 +00:00
Andy Allan
71be435886 Fix case when user block durations are slightly negative
The output from ActiveSupport::Duration is wildly unhelpful in those cases

Fixes #3210
2021-06-09 15:16:35 +01:00
Andy Allan
5ce14cfa4d Ensure that short duration blockss are shown as '0 hours'
Passing `:count => nil` means that i18n.t will return the hash of translations, so use a default value of 0 when checking for hours to prevent this.

Refs #3210
2021-06-09 14:17:56 +01:00
Tom Hughes
9b52542e52 Use simple string matches for user_blocks_helper tests
Testing against the translations is not something we do anywhere
else is and is dangerously close to testing the helper against
itself which is a bit pointless.
2017-02-19 11:50:01 +00:00
Tom Hughes
9c926c6c71 Use the factory to create user blocks 2017-02-19 11:42:38 +00:00
Simon Poole
325cd12c24 Make rupocop happy and correct placement of include 2017-02-19 12:35:02 +01:00
Simon Poole
455e906afa Improve wording and add test 2017-02-19 11:59:34 +01:00