test/test_helper.rb in groupdate-2.5.1 vs test/test_helper.rb in groupdate-2.5.2
- old
+ new
@@ -904,9 +904,16 @@
create_user "2014-05-01 00:00:00 UTC"
create_user "2014-05-03 00:00:00 UTC"
assert_equal 2, User.group_by_day(:created_at, carry_forward: true).count[utc.parse("2014-05-02 00:00:00 UTC")]
end
+ # dates
+
+ def test_dates
+ create_user "2014-03-01 12:00:00 UTC"
+ assert_equal ({Date.parse("2014-03-01") => 1}), User.group_by_day(:created_at, dates: true).count
+ end
+
# helpers
def assert_format(method, expected, format, options = {})
assert_equal expected, call_method(method, :created_at, options.merge(format: format)).keys.first
end