From 861ca78179869e13b4b73baa6968127cfd30c401 Mon Sep 17 00:00:00 2001
From: Jean-Philippe Lang <jp_lang@yahoo.fr>
Date: Mon, 13 Aug 2012 14:41:53 +0000
Subject: Fixed that roadmap anchor links can be ambigous (#11540).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10200 e93f8b46-1217-0410-a6f0-8f06a7374b81
---
 test/functional/versions_controller_test.rb | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

(limited to 'test/functional')

diff --git a/test/functional/versions_controller_test.rb b/test/functional/versions_controller_test.rb
index 87fd966b6..c6906ca5b 100644
--- a/test/functional/versions_controller_test.rb
+++ b/test/functional/versions_controller_test.rb
@@ -80,6 +80,20 @@ class VersionsControllerTest < ActionController::TestCase
     assert assigns(:versions).include?(@subproject_version), "Subproject version not found"
   end
 
+  def test_index_should_prepend_shared_versions
+    get :index, :project_id => 1
+    assert_response :success
+
+    assert_select '#sidebar' do
+      assert_select 'a[href=?]', '#2.0', :text => '2.0'
+      assert_select 'a[href=?]', '#subproject1-2.0', :text => 'eCookbook Subproject 1 - 2.0'
+    end
+    assert_select '#content' do
+      assert_select 'a[name=?]', '2.0', :text => '2.0'
+      assert_select 'a[name=?]', 'subproject1-2.0', :text => 'eCookbook Subproject 1 - 2.0'
+    end
+  end
+
   def test_show
     get :show, :id => 2
     assert_response :success
-- 
cgit v1.2.3