test for the group by date method