Commit b63e4c24dbb23949f6f487a188a267d5533bcaa2
1 parent
e315b563
Exists in
master
and in
29 other branches
Fixing ContentViewerController test
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
test/functional/content_viewer_controller_test.rb
@@ -960,10 +960,10 @@ class ContentViewerControllerTest < ActionController::TestCase | @@ -960,10 +960,10 @@ class ContentViewerControllerTest < ActionController::TestCase | ||
960 | 960 | ||
961 | should 'display others pages of forum posts' do | 961 | should 'display others pages of forum posts' do |
962 | forum = Forum.create!(:name => 'My forum', :profile => profile, :posts_per_page => 5) | 962 | forum = Forum.create!(:name => 'My forum', :profile => profile, :posts_per_page => 5) |
963 | + now = Time.now | ||
963 | for n in 1..10 | 964 | for n in 1..10 |
965 | + Time.stubs(:now).returns(now - 10.days + n.days) | ||
964 | forum.children << art = TextileArticle.create!(:name => "Post #{n}", :profile => profile, :parent => forum) | 966 | forum.children << art = TextileArticle.create!(:name => "Post #{n}", :profile => profile, :parent => forum) |
965 | - art.updated_at = (10 - n).days.ago | ||
966 | - art.send :update_without_callbacks | ||
967 | end | 967 | end |
968 | assert_equal 10, forum.posts.size | 968 | assert_equal 10, forum.posts.size |
969 | 969 |