test/cohortly_test.rb in cohortly-0.0.6 vs test/cohortly_test.rb in cohortly-0.0.7
- old
+ new
@@ -88,9 +88,10 @@
assert report.weekly
time = DateTime.strptime('2011-08', '%Y-%W').utc
assert_equal report.key_to_time('2011-08'), time
assert_equal report.key_to_time(report.time_to_key(time)), time
+
assert_equal report.time_to_key(Time.utc(2011,8)), '2011-31'
assert_equal report.time_to_key(Time.utc(2011,1)), '2011-00'
assert_equal report.start_key, report.time_to_key(Time.now.utc - 15.weeks)
assert_equal report.period_cohorts.length, 16