diff options
-rw-r--r-- | app/helpers/application_helper.rb | 2 | ||||
-rw-r--r-- | test/functional/welcome_controller_test.rb | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 8c328326f..d32c86b75 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -253,7 +253,7 @@ module ApplicationHelper def project_tree_options_for_select(projects, options = {}) s = '' project_tree(projects) do |project, level| - name_prefix = (level > 0 ? (' ' * 2 * level + '» ').html_safe : '') + name_prefix = (level > 0 ? (' ' * 2 * level + '» ') : '').html_safe tag_options = {:value => project.id} if project == options[:selected] || (options[:selected].respond_to?(:include?) && options[:selected].include?(project)) tag_options[:selected] = 'selected' diff --git a/test/functional/welcome_controller_test.rb b/test/functional/welcome_controller_test.rb index af86f6638..a846d1aaf 100644 --- a/test/functional/welcome_controller_test.rb +++ b/test/functional/welcome_controller_test.rb @@ -96,6 +96,16 @@ class WelcomeControllerTest < ActionController::TestCase assert @controller.respond_to?(:call_hook) end + def test_project_jump_box_should_escape_names_once + Project.find(1).update_attribute :name, 'Foo & Bar' + @request.session[:user_id] = 2 + + get :index + assert_select "#header select" do + assert_select "option", :text => 'Foo & Bar' + end + end + context "test_api_offset_and_limit" do context "without params" do should "return 0, 25" do |