diff --git a/test/unit/api/articles_test.rb b/test/unit/api/articles_test.rb index b44887d..ca0399d 100644 --- a/test/unit/api/articles_test.rb +++ b/test/unit/api/articles_test.rb @@ -84,8 +84,8 @@ class ArticlesTest < ActiveSupport::TestCase should 'list articles with pagination' do Article.destroy_all - article_one = fast_create(Article, :profile_id => user.person.id, :name => "Another thing") - article_two = fast_create(Article, :profile_id => user.person.id, :name => "Some thing") + article_one = fast_create(Article, :profile_id => user.person.id, :name => "Another thing", :created_at => 2.days.ago) + article_two = fast_create(Article, :profile_id => user.person.id, :name => "Some thing", :created_at => 1.day.ago) params[:page] = 1 params[:per_page] = 1 diff --git a/test/unit/api/communities_test.rb b/test/unit/api/communities_test.rb index c954508..029d564 100644 --- a/test/unit/api/communities_test.rb +++ b/test/unit/api/communities_test.rb @@ -121,8 +121,8 @@ class CommunitiesTest < ActiveSupport::TestCase end should 'list communities with pagination' do - community1 = fast_create(Community, :public_profile => true) - community2 = fast_create(Community) + community1 = fast_create(Community, :public_profile => true, :created_at => 1.day.ago) + community2 = fast_create(Community, :created_at => 2.days.ago) params[:page] = 2 params[:per_page] = 1 -- libgit2 0.21.2