Skip to content
This repository has been archived by the owner on Jun 30, 2018. It is now read-only.

Commit

Permalink
[TEST] Added test for preserving String document IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
karmi committed Jul 9, 2011
1 parent 58276e4 commit 648c77e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/integration/active_model_searchable_test.rb
Expand Up @@ -63,14 +63,15 @@ def teardown

should "retrieve sorted documents by IDs returned from search" do
SupermodelArticle.create! :title => 'foo'
SupermodelArticle.create! :title => 'bar'
SupermodelArticle.create! :id => 'abc123', :title => 'bar'

SupermodelArticle.elasticsearch_index.refresh
results = SupermodelArticle.search 'foo OR bar^100'

assert_equal 2, results.count

assert_equal 'bar', results.first.title
assert_equal 'bar', results.first.title
assert_equal 'abc123', results.first.id
end

end
Expand Down

0 comments on commit 648c77e

Please sign in to comment.