spec/classes/grouping_spec.rb in reportable-1.0.3 vs spec/classes/grouping_spec.rb in reportable-1.1.0
- old
+ new
@@ -21,10 +21,10 @@
it 'should use DATE_FORMAT with format string "%Y/%m/%d/%H" for grouping :hour' do
Saulabs::Reportable::Grouping.new(:hour).send(:to_sql, 'created_at').should == "DATE_FORMAT(created_at, '%Y/%m/%d/%H')"
end
it 'should use DATE_FORMAT with format string "%Y/%m/%d" for grouping :day' do
- Saulabs::Reportable::Grouping.new(:day).send(:to_sql, 'created_at').should == "DATE_FORMAT(created_at, '%Y/%m/%d')"
+ Saulabs::Reportable::Grouping.new(:day).send(:to_sql, 'created_at').should == "DATE(created_at)"
end
it 'should use YEARWEEK with mode 3 for grouping :week' do
Saulabs::Reportable::Grouping.new(:week).send(:to_sql, 'created_at').should == "YEARWEEK(created_at, 3)"
end