From c7066b57c741f0407f6fe61e2bc6689eee0c4a53 Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Fri, 7 Aug 2015 16:28:45 -0300 Subject: [PATCH] api: ensure apropriate order on tests --- test/unit/api/articles_test.rb | 4 ++-- test/unit/api/communities_test.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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