Commit 781ea363f8b0a2102e84aa4d7232853afed64e53
1 parent
d05c0c85
Exists in
master
and in
29 other branches
Fixing forum helper test
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
test/unit/forum_helper_test.rb
... | ... | @@ -48,8 +48,8 @@ class ForumHelperTest < ActiveSupport::TestCase |
48 | 48 | should 'return last comment date if it has comments' do |
49 | 49 | some_post = TextileArticle.create!(:name => 'First post', :profile => profile, :parent => forum, :published => true) |
50 | 50 | a1, a2 = create_user('a1').person, create_user('a2').person |
51 | - some_post.comments << Comment.new(:title => 'test', :body => 'test', :author => a1) | |
52 | - some_post.comments << Comment.new(:title => 'test', :body => 'test', :author => a2) | |
51 | + some_post.comments << Comment.new(:title => 'test', :body => 'test', :author => a1, :created_at => Time.now - 1.day) | |
52 | + some_post.comments << Comment.new(:title => 'test', :body => 'test', :author => a2, :created_at => Time.now) | |
53 | 53 | c = Comment.last |
54 | 54 | assert_equal 2, some_post.comments.count |
55 | 55 | out = last_topic_update(some_post) | ... | ... |