summaryrefslogtreecommitdiffstats
path: root/test/functional/versions_controller_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/versions_controller_test.rb')
-rw-r--r--test/functional/versions_controller_test.rb14
1 files changed, 14 insertions, 0 deletions
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