Made sure to use api.startOfDay in dailies.coffee unit test when calculating day of the week.

This commit is contained in:
Allen Pan 2015-05-23 23:57:46 -07:00
parent 90dd078a6a
commit 0dcd388925

View file

@ -348,7 +348,7 @@ describe 'weekly that repeats on M,W,F every x days', ->
_.times 100, (day) ->
valid_days = { Mon: true, Wed: true, Fri: true }
day_to_test = start_date.add(day, 'days')
day_of_week = moment(day_to_test).format('ddd')
day_of_week = shared.startOfDay({now:day_to_test}).format('ddd')
isDue = shared.shouldDo day_to_test, weekly
is_correct_week = shared.numWeeksApart(day_to_test, start_date) % due == 0