Commit fb2196ada14aa88ec4339a55a116a28affc98069
1 parent
fa430142
Exists in
master
and in
22 other branches
ActionItem392: fixing two test to work with a remote ferret server
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@2055 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
4 changed files
with
12 additions
and
13 deletions
Show diff stats
config/ferret_server.yml
test/functional/search_controller_test.rb
... | ... | @@ -487,8 +487,6 @@ class SearchControllerTest < Test::Unit::TestCase |
487 | 487 | p.categories << child |
488 | 488 | p.save! |
489 | 489 | |
490 | - Profile.rebuild_index | |
491 | - | |
492 | 490 | get :index, :category_path => ['parent-category'], :query => 'test_profile', :find_in => ['people'] |
493 | 491 | |
494 | 492 | assert_includes assigns(:results)[:people], p | ... | ... |
test/unit/profile_test.rb
... | ... | @@ -516,14 +516,10 @@ class ProfileTest < Test::Unit::TestCase |
516 | 516 | assert_includes klass.new.extra_data_for_index, result |
517 | 517 | end |
518 | 518 | |
519 | + # TestingExtraDataForIndex is a subclass of profile that adds a block as | |
520 | + # content to be added to the index. The block returns "sample indexed text" | |
521 | + # see test/mocks/test/testing_extra_data_for_index.rb | |
519 | 522 | should 'actually index by results of extra_data_for_index' do |
520 | - | |
521 | - class ::TestingExtraDataForIndex < Profile | |
522 | - extra_data_for_index do |obj| | |
523 | - 'sample indexed text' | |
524 | - end | |
525 | - end | |
526 | - | |
527 | 523 | profile = TestingExtraDataForIndex.create!(:name => 'testprofile', :identifier => 'testprofile') |
528 | 524 | |
529 | 525 | assert_includes TestingExtraDataForIndex.find_by_contents('sample'), profile | ... | ... |