diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 692dfb2..ad7b57a 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -362,6 +362,7 @@ module ApplicationHelper return render :file => file, :use_full_path => false end end + nil end def theme_header diff --git a/test/functional/doc_controller_test.rb b/test/functional/doc_controller_test.rb index 9c82f55..b03644a 100644 --- a/test/functional/doc_controller_test.rb +++ b/test/functional/doc_controller_test.rb @@ -23,20 +23,20 @@ class DocControllerTest < ActionController::TestCase end should 'translate section' do - get :section, :section => 'admin' + get :section, :section => 'user' assert_equal 'en', assigns(:section).language @controller.stubs(:language).returns('pt') - get :section, :section => 'admin' + get :section, :section => 'user' assert_equal 'pt', assigns(:section).language end should 'translate topic' do - get :topic, :section => 'admin', :topic => '100-email' + get :topic, :section => 'user', :topic => 'accepting-friends' assert_equal 'en', assigns(:topic).language @controller.stubs(:language).returns('pt') - get :topic, :section => 'admin', :topic => '100-email' + get :topic, :section => 'user', :topic => 'accepting-friends' assert_equal 'pt', assigns(:topic).language end diff --git a/test/unit/application_helper_test.rb b/test/unit/application_helper_test.rb index 264652b..f5e622f 100644 --- a/test/unit/application_helper_test.rb +++ b/test/unit/application_helper_test.rb @@ -170,8 +170,10 @@ class ApplicationHelperTest < Test::Unit::TestCase should 'ignore unexisting theme footer' do stubs(:theme_path).returns('/user_themes/mytheme') footer_path = RAILS_ROOT + '/public/user_themes/mytheme/footer.rhtml' + alternate_footer_path = RAILS_ROOT + '/public/user_themes/mytheme/footer.html.erb' File.expects(:exists?).with(footer_path).returns(false) + File.expects(:exists?).with(alternate_footer_path).returns(false) expects(:render).with(:file => footer).never assert_nil theme_footer diff --git a/test/unit/doc_section_test.rb b/test/unit/doc_section_test.rb index a0c2bcc..8912f31 100644 --- a/test/unit/doc_section_test.rb +++ b/test/unit/doc_section_test.rb @@ -21,7 +21,7 @@ class DocSectionTest < ActiveSupport::TestCase should 'list available sections' do sections = DocSection.all assert(sections.size > 0, 'should load sections ') - assert(sections.find { |item| item.title == 'Administration'}, 'should find section "Administration"') + assert(sections.find { |item| item.title == 'Content Management'}, 'should find section "Content Management"') assert(sections.find { |item| item.title == 'User features'}, 'should find section "User features"') end @@ -30,7 +30,7 @@ class DocSectionTest < ActiveSupport::TestCase # break. If those translations change, this test will also break. should 'list section for a given language' do sections = DocSection.all('pt') - assert(sections.find { |item| item.title == 'Administração'}, 'should find section "Administration" translated') + assert(sections.find { |item| item.title == 'Gerenciamento de conteúdo'}, 'should find section "Content Management" translated') assert(sections.find { |item| item.title == 'Funcionalidades de Usuário'}, 'should find section "User features" translated') end @@ -46,28 +46,28 @@ class DocSectionTest < ActiveSupport::TestCase # This test also depends on the existance of specific documentation sections. # The same conditions as the above tests apply. should 'list items' do - section = DocSection.all.find {|item| item.title == 'Administration' } + section = DocSection.all.find {|item| item.title == 'Content Management' } assert section.items.size > 0, "should load at least one item" - assert section.items.find {|item| item.title == 'E-mail settings' && item.text =~ /