From b63e4c24dbb23949f6f487a188a267d5533bcaa2 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Sat, 17 Dec 2011 12:59:35 +0000 Subject: [PATCH] Fixing ContentViewerController test --- test/functional/content_viewer_controller_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functional/content_viewer_controller_test.rb b/test/functional/content_viewer_controller_test.rb index baf9c18..34cc9be 100644 --- a/test/functional/content_viewer_controller_test.rb +++ b/test/functional/content_viewer_controller_test.rb @@ -960,10 +960,10 @@ class ContentViewerControllerTest < ActionController::TestCase should 'display others pages of forum posts' do forum = Forum.create!(:name => 'My forum', :profile => profile, :posts_per_page => 5) + now = Time.now for n in 1..10 + Time.stubs(:now).returns(now - 10.days + n.days) forum.children << art = TextileArticle.create!(:name => "Post #{n}", :profile => profile, :parent => forum) - art.updated_at = (10 - n).days.ago - art.send :update_without_callbacks end assert_equal 10, forum.posts.size -- libgit2 0.21.2