Commit 4e97f113db5ad91ed933ce9651013b1c5d40baaf
1 parent
5ffb073c
Exists in
master
and in
28 other branches
recent-content-block: avoid test failure due to randomness
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
plugins/recent_content/test/unit/recent_content_block_test.rb
... | ... | @@ -61,9 +61,9 @@ class RecentContentBlockTest < ActiveSupport::TestCase |
61 | 61 | |
62 | 62 | root = fast_create(Blog, :name => 'test-blog', :profile_id => profile.id) |
63 | 63 | |
64 | - a1 = fast_create(TextileArticle, :name => 'article #1', :profile_id => profile.id, :parent_id => root.id) | |
65 | - a2 = fast_create(TextileArticle, :name => 'article #2', :profile_id => profile.id, :parent_id => root.id) | |
66 | - a3 = fast_create(TextileArticle, :name => 'article #3', :profile_id => profile.id, :parent_id => root.id) | |
64 | + a1 = fast_create(TextileArticle, :name => 'article #1', :profile_id => profile.id, :parent_id => root.id, :created_at => Time.now - 2.days) | |
65 | + a2 = fast_create(TextileArticle, :name => 'article #2', :profile_id => profile.id, :parent_id => root.id, :created_at => Time.now - 1.days) | |
66 | + a3 = fast_create(TextileArticle, :name => 'article #3', :profile_id => profile.id, :parent_id => root.id, :created_at => Time.now) | |
67 | 67 | |
68 | 68 | block = RecentContentBlock.new |
69 | 69 | block.stubs(:holder).returns(profile) | ... | ... |