Commit c48a83f6111ccdcce9517d1f8a05cd9efeb50f3c

Authored by Antonio Terceiro
1 parent 5962c438

api/search_test: fix flaky test

The search will return previously created articles of that type (such as
the home page of a user that was created during the tests)
Showing 1 changed file with 1 additions and 0 deletions   Show diff stats
test/unit/api/search_test.rb
... ... @@ -31,6 +31,7 @@ class SearchTest < ActiveSupport::TestCase
31 31 end
32 32  
33 33 should 'not list articles of wrong type' do
  34 + Article.delete_all
34 35 fast_create(Article, :profile_id => person.id)
35 36 get "/api/v1/search/article?type=TinyMceArticle"
36 37 json = JSON.parse(last_response.body)
... ...