Commit f759d50d31978d1d30417a80cc9226b0a618afbb
Committed by
Leandro Santos
1 parent
dc6c5813
Exists in
master
and in
6 other branches
Fix event test when a time zone is set
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
test/unit/event_test.rb
... | ... | @@ -97,7 +97,8 @@ class EventTest < ActiveSupport::TestCase |
97 | 97 | end |
98 | 98 | |
99 | 99 | should 'provide nice display format' do |
100 | - event = build(Event, :start_date => DateTime.new(2008,1,1), :end_date => DateTime.new(2008,1,1), :link => 'http://www.myevent.org', :body => '<p>my somewhat short description</p>') | |
100 | + date = Time.zone.local(2008, 1, 1, 0, 0, 0) | |
101 | + event = build(Event, :start_date => date, :end_date => date, :link => 'http://www.myevent.org', :body => '<p>my somewhat short description</p>') | |
101 | 102 | display = instance_eval(&event.to_html) |
102 | 103 | |
103 | 104 | assert_tag_in_string display, :content => Regexp.new("January 1, 2008") | ... | ... |