Commit dd08c013348e706e1d2cf0ce23ca9db9dae61f1d

Authored by Daniela Feitosa
1 parent 98c68e5f

Fixed test

After removing address from solr index, 2 tests were failing
Showing 1 changed file with 3 additions and 2 deletions   Show diff stats
test/unit/profile_test.rb
... ... @@ -1826,7 +1826,6 @@ class ProfileTest < ActiveSupport::TestCase
1826 1826  
1827 1827 # fields
1828 1828 assert_includes Profile.find_by_contents('Hiro')[:results].docs, p
1829   - assert_includes Profile.find_by_contents('Stor')[:results].docs, p
1830 1829 assert_includes Profile.find_by_contents('Protagonist')[:results].docs, p
1831 1830 # filters
1832 1831 assert_includes Profile.find_by_contents('Hiro', {}, { :filter_queries => ["public:true"]})[:results].docs, p
... ... @@ -1836,13 +1835,15 @@ class ProfileTest < ActiveSupport::TestCase
1836 1835 assert_includes Profile.find_by_contents("Inglewood")[:results].docs, p
1837 1836 assert_includes Profile.find_by_contents("California")[:results].docs, p
1838 1837 assert_includes Profile.find_by_contents("Science")[:results].docs, p
  1838 + # not includes
  1839 + assert_not_includes Profile.find_by_contents('Stor')[:results].docs, p
1839 1840 end
1840 1841  
1841 1842 should 'boost name matches' do
1842 1843 TestSolr.enable
1843 1844 in_addr = create(Person, :name => 'something', :address => 'bananas in the address!', :user_id => fast_create(User).id)
1844 1845 in_name = create(Person, :name => 'bananas in the name!', :user_id => fast_create(User).id)
1845   - assert_equal [in_name, in_addr], Person.find_by_contents('bananas')[:results].docs
  1846 + assert_equal [in_name], Person.find_by_contents('bananas')[:results].docs
1846 1847 end
1847 1848  
1848 1849 should 'reindex articles after saving' do
... ...