diff --git a/plugins/comment_group/test/functional/comment_group_plugin_profile_controller_test.rb b/plugins/comment_group/test/functional/comment_group_plugin_profile_controller_test.rb index de95915..205d64c 100644 --- a/plugins/comment_group/test/functional/comment_group_plugin_profile_controller_test.rb +++ b/plugins/comment_group/test/functional/comment_group_plugin_profile_controller_test.rb @@ -36,10 +36,10 @@ class CommentGroupPluginProfileControllerTest < ActionController::TestCase end should 'show first page comments only' do - comment1 = fast_create(Comment, :source_id => article, :author_id => profile, :title => 'a comment', :body => 'secondpage', :group_id => 0) - comment2 = fast_create(Comment, :source_id => article, :author_id => profile, :title => 'a comment', :body => 'firstpage 1', :group_id => 0) - comment3 = fast_create(Comment, :source_id => article, :author_id => profile, :title => 'a comment', :body => 'firstpage 2', :group_id => 0) - comment4 = fast_create(Comment, :source_id => article, :author_id => profile, :title => 'a comment', :body => 'firstpage 3', :group_id => 0) + comment1 = fast_create(Comment, :source_id => article, :author_id => profile, :title => 'a comment', :created_at => Time.now, :body => 'secondpage', :group_id => 0) + comment2 = fast_create(Comment, :source_id => article, :author_id => profile, :title => 'a comment', :created_at => Time.now - 1.day, :body => 'firstpage 1', :group_id => 0) + comment3 = fast_create(Comment, :source_id => article, :author_id => profile, :title => 'a comment', :created_at => Time.now - 2.days, :body => 'firstpage 2', :group_id => 0) + comment4 = fast_create(Comment, :source_id => article, :author_id => profile, :title => 'a comment', :created_at => Time.now - 3.days, :body => 'firstpage 3', :group_id => 0) xhr :get, :view_comments, :profile => @profile.identifier, :article_id => article.id, :group_id => 0 assert_match /firstpage 1/, @response.body assert_match /firstpage 2/, @response.body -- libgit2 0.21.2