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
| @@ -6,7 +6,7 @@ development: | @@ -6,7 +6,7 @@ development: | ||
| 6 | host: localhost | 6 | host: localhost |
| 7 | port: 9010 | 7 | port: 9010 |
| 8 | pid_file: log/ferret.pid | 8 | pid_file: log/ferret.pid |
| 9 | -test: | ||
| 10 | - host: localhost | ||
| 11 | - port: 9009 | ||
| 12 | - pid_file: log/ferret.pid | 9 | +#test: |
| 10 | +# host: localhost | ||
| 11 | +# port: 9009 | ||
| 12 | +# pid_file: log/ferret.pid |
test/functional/search_controller_test.rb
| @@ -487,8 +487,6 @@ class SearchControllerTest < Test::Unit::TestCase | @@ -487,8 +487,6 @@ class SearchControllerTest < Test::Unit::TestCase | ||
| 487 | p.categories << child | 487 | p.categories << child |
| 488 | p.save! | 488 | p.save! |
| 489 | 489 | ||
| 490 | - Profile.rebuild_index | ||
| 491 | - | ||
| 492 | get :index, :category_path => ['parent-category'], :query => 'test_profile', :find_in => ['people'] | 490 | get :index, :category_path => ['parent-category'], :query => 'test_profile', :find_in => ['people'] |
| 493 | 491 | ||
| 494 | assert_includes assigns(:results)[:people], p | 492 | assert_includes assigns(:results)[:people], p |
test/unit/profile_test.rb
| @@ -516,14 +516,10 @@ class ProfileTest < Test::Unit::TestCase | @@ -516,14 +516,10 @@ class ProfileTest < Test::Unit::TestCase | ||
| 516 | assert_includes klass.new.extra_data_for_index, result | 516 | assert_includes klass.new.extra_data_for_index, result |
| 517 | end | 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 | should 'actually index by results of extra_data_for_index' do | 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 | profile = TestingExtraDataForIndex.create!(:name => 'testprofile', :identifier => 'testprofile') | 523 | profile = TestingExtraDataForIndex.create!(:name => 'testprofile', :identifier => 'testprofile') |
| 528 | 524 | ||
| 529 | assert_includes TestingExtraDataForIndex.find_by_contents('sample'), profile | 525 | assert_includes TestingExtraDataForIndex.find_by_contents('sample'), profile |