Commit 8a4841d6b71a25c5c83130c357eeae31d02b8174
Committed by
Rodrigo Souto
1 parent
2540b45c
Exists in
master
and in
22 other branches
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>
Showing
3 changed files
with
9 additions
and
5 deletions
Show diff stats
test/functional/application_controller_test.rb
... | ... | @@ -484,7 +484,7 @@ class ApplicationControllerTest < 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 < 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 < 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 | ... | ... |