Skip to content

Commit

Permalink
Now that starts_at and ends_at are DateTimes we need to build the eve…
Browse files Browse the repository at this point in the history
…nts in the tests with datetimes. Otherwise we could see some troubles with timezones and edge values (events at 12AM belonging to the previous day)

Conflicts:

	spec/requests/refinery/calendar/events/index_date_filters_spec.rb
	spec/requests/refinery/calendar/events/mini_calendar_spec.rb
  • Loading branch information
brenes committed Feb 22, 2013
1 parent b878275 commit 11c4d09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/models/refinery/calendar/event_spec.rb
Expand Up @@ -36,6 +36,7 @@ module Calendar
before :each do before :each do


FactoryGirl.create(:event, starts_at: Date.tomorrow - 2.hours) FactoryGirl.create(:event, starts_at: Date.tomorrow - 2.hours)
FactoryGirl.create(:event, starts_at: Date.tomorrow.beginning_of_day)
FactoryGirl.create(:event, starts_at: Date.tomorrow + 2.hours) FactoryGirl.create(:event, starts_at: Date.tomorrow + 2.hours)
FactoryGirl.create(:event, starts_at: Date.tomorrow + 6.hours) FactoryGirl.create(:event, starts_at: Date.tomorrow + 6.hours)
FactoryGirl.create(:event, starts_at: Date.tomorrow + 12.hours) FactoryGirl.create(:event, starts_at: Date.tomorrow + 12.hours)
Expand All @@ -46,7 +47,7 @@ module Calendar


subject { Event.on_day(Date.tomorrow) } subject { Event.on_day(Date.tomorrow) }


its(:length) { should == 4 } its(:length) { should == 5 }


end end


Expand Down

0 comments on commit 11c4d09

Please sign in to comment.