Commit 48614ae0 authored by Leandro Nunes's avatar Leandro Nunes
Browse files

fixing cucumber test

parent b26b871e
......@@ -30,7 +30,7 @@ module EventsHelper
# the day itself
date,
# is there any events in this date?
events.any? {|event| event.date_range.include?(date)},
events.any? {|event| event.date_range.cover?(date)},
# is this date in the current month?
true
]
......
......@@ -81,7 +81,7 @@ class Category < ActiveRecord::Base
end
def upcoming_events(limit = 10)
self.events.paginate(:conditions => [ 'start_date >= ?', Date.today ], :order => 'start_date', :page => 1, :per_page => limit)
self.events.paginate(:conditions => [ 'start_date >= ?', DateTime.now.beginning_of_day ], :order => 'start_date', :page => 1, :per_page => limit)
end
def display_in_menu?
......
......@@ -223,7 +223,7 @@ Feature: events
| owner | name | start_date | end_date |
| josesilva | WikiSym 2009 | 2009-10-25 | 2009-10-27 |
When I am on /profile/josesilva/events/2009/10/26
Then I should see "October 25, 2009 to October 27, 2009"
Then I should see "October 25, 2009 0:00 to October 27, 2009 0:00"
Scenario: show place of the event
Given I am on /profile/josesilva/events/2009/10
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment