Commit 2aefbbfb8ca3bb60ee01087c1df173d32cced0b4

Authored by Andrew Kane
1 parent 720da871

Added test for #115

Showing 1 changed file with 8 additions and 0 deletions   Show diff stats
test/test_helper.rb
... ... @@ -152,6 +152,14 @@ module TestDatabase
152 152 assert_equal expected, User.group_by_day(:created_at).group_by_year(:created_at).count
153 153 end
154 154  
  155 + def test_groupdate_multiple_hour_of_day_day_of_week
  156 + create_user "2013-05-01 00:00:00 UTC", 1
  157 + expected = {
  158 + [0, 3] => 1
  159 + }
  160 + assert_equal expected, User.group_by_hour_of_day(:created_at).group_by_day_of_week(:created_at).count
  161 + end
  162 +
155 163 def test_not_modified
156 164 create_user "2013-05-01 00:00:00 UTC"
157 165 expected = {utc.parse("2013-05-01 00:00:00 UTC") => 1}
... ...