Commit c7066b57c741f0407f6fe61e2bc6689eee0c4a53
1 parent
8136b8d2
Exists in
master
and in
29 other branches
api: ensure apropriate order on tests
Showing
2 changed files
with
4 additions
and
4 deletions
Show diff stats
test/unit/api/articles_test.rb
@@ -84,8 +84,8 @@ class ArticlesTest < ActiveSupport::TestCase | @@ -84,8 +84,8 @@ class ArticlesTest < ActiveSupport::TestCase | ||
84 | 84 | ||
85 | should 'list articles with pagination' do | 85 | should 'list articles with pagination' do |
86 | Article.destroy_all | 86 | Article.destroy_all |
87 | - article_one = fast_create(Article, :profile_id => user.person.id, :name => "Another thing") | ||
88 | - article_two = fast_create(Article, :profile_id => user.person.id, :name => "Some thing") | 87 | + article_one = fast_create(Article, :profile_id => user.person.id, :name => "Another thing", :created_at => 2.days.ago) |
88 | + article_two = fast_create(Article, :profile_id => user.person.id, :name => "Some thing", :created_at => 1.day.ago) | ||
89 | 89 | ||
90 | params[:page] = 1 | 90 | params[:page] = 1 |
91 | params[:per_page] = 1 | 91 | params[:per_page] = 1 |
test/unit/api/communities_test.rb
@@ -121,8 +121,8 @@ class CommunitiesTest < ActiveSupport::TestCase | @@ -121,8 +121,8 @@ class CommunitiesTest < ActiveSupport::TestCase | ||
121 | end | 121 | end |
122 | 122 | ||
123 | should 'list communities with pagination' do | 123 | should 'list communities with pagination' do |
124 | - community1 = fast_create(Community, :public_profile => true) | ||
125 | - community2 = fast_create(Community) | 124 | + community1 = fast_create(Community, :public_profile => true, :created_at => 1.day.ago) |
125 | + community2 = fast_create(Community, :created_at => 2.days.ago) | ||
126 | 126 | ||
127 | params[:page] = 2 | 127 | params[:page] = 2 |
128 | params[:per_page] = 1 | 128 | params[:per_page] = 1 |