Commit 3f63e993d42ecc2fb6128686872417ba51021aea

Authored by Arthur Esposte
1 parent 8b1805dc
Exists in tests_fixies and in 1 other branch tests

Fix functional and integration broken tests

Signed-off-by: André Guedes <andrebsguedes@gmail.com>
Signed-off-by: Arthur Del Esposte <arthurmde@gmail.com>
Signed-off-by: Fabio Teixeira <fabio1079@gmail.com>
Signed-off-by: Tallys Martins <tallysmartins@yahoo.com.br>
test/functional/application_controller_test.rb
... ... @@ -484,7 +484,7 @@ class ApplicationControllerTest &lt; ActionController::TestCase
484 484 should 'change postgresql schema' do
485 485 uses_host 'schema1.com'
486 486 Noosfero::MultiTenancy.expects(:on?).returns(true)
487   - Noosfero::MultiTenancy.expects(:mapping).returns({ 'schema1.com' => 'schema1' })
  487 + Noosfero::MultiTenancy.expects(:mapping).returns({ 'schema1.com' => 'schema1' }).at_least_once
488 488 exception = assert_raise(ActiveRecord::StatementInvalid) { get :index }
489 489 assert_match /SET search_path TO schema1/, exception.message
490 490 end
... ...
test/functional/profile_controller_test.rb
... ... @@ -508,11 +508,15 @@ class ProfileControllerTest &lt; ActionController::TestCase
508 508 end
509 509  
510 510 should 'show description of person' do
  511 + environment = Environment.default
  512 + environment.custom_person_fields = {:description => { :active => true, :required => false, :signup => false }}
  513 + environment.save!
  514 + environment.reload
511 515 login_as(@profile.identifier)
512   - @profile.description = 'Person\'s description'
513   - @profile.save
  516 + @profile.description = 'Person description'
  517 + @profile.save!
514 518 get :index, :profile => @profile.identifier
515   - assert_tag :tag => 'div', :attributes => { :class => 'public-profile-description' }, :content => /Person\'s description/
  519 + assert_tag :tag => 'div', :attributes => { :class => 'public-profile-description' }, :content => /Person description/
516 520 end
517 521  
518 522 should 'not show description of orgarnization if not filled' do
... ...
test/integration/routing_test.rb
... ... @@ -135,7 +135,7 @@ class RoutingTest &lt; ActionController::IntegrationTest
135 135 end
136 136  
137 137 def test_assets_routing
138   - assert_routing('/assets/my-asset/a/b/c', :controller => 'search', :action => 'assets', :asset => 'my-asset', :category_path => 'a/b/c')
  138 + assert_routing('/search/assets/a/b/c', :controller => 'search', :action => 'assets', :category_path => 'a/b/c')
139 139 end
140 140  
141 141 def test_content_view_with_dot
... ...