Commit 7fe25f4dbf844dd99d43413f535817363101e524

Authored by Victor Costa
1 parent b69e4d6a

Fix unit test in api search

Showing 1 changed file with 1 additions and 2 deletions   Show diff stats
test/unit/api/search_test.rb
... ... @@ -131,8 +131,7 @@ class SearchTest < ActiveSupport::TestCase
131 131 get "/api/v1/search/article?category_ids[]=#{category1.id}&category_ids[]=#{category2.id}"
132 132 json = JSON.parse(last_response.body)
133 133 assert_equal 2, json['articles'].count
134   - assert_equal article1.id, json['articles'].first["id"]
135   - assert_equal article2.id, json['articles'].last["id"]
  134 + assert_equivalent [article1.id, article2.id], json['articles'].map{|a| a['id']}
136 135 end
137 136  
138 137 end
... ...