summaryrefslogtreecommitdiffstats
path: root/test/functional/projects_controller_test.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2018-08-09 11:49:53 +0000
committerGo MAEDA <maeda@farend.jp>2018-08-09 11:49:53 +0000
commitd510c4e50e32d48c83416b932d81ca36fac198ad (patch)
tree44d59cbd96814402c487dc06c512b5aa7e20a1db /test/functional/projects_controller_test.rb
parentef79ec82942a31db3049c9d6e42c99805bdcaa13 (diff)
downloadredmine-d510c4e50e32d48c83416b932d81ca36fac198ad.tar.gz
redmine-d510c4e50e32d48c83416b932d81ca36fac198ad.zip
Mark default version in versions tab from project settings (#27799).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@17467 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/projects_controller_test.rb')
-rw-r--r--test/functional/projects_controller_test.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb
index 68265ad05..df1da4a28 100644
--- a/test/functional/projects_controller_test.rb
+++ b/test/functional/projects_controller_test.rb
@@ -641,6 +641,27 @@ class ProjectsControllerTest < Redmine::ControllerTest
assert_select 'a#tab-versions[href=?]', '/projects/ecookbook/settings/versions?version_name=.1&version_status='
end
+ def test_settings_should_show_default_version_in_versions_tab
+ project = Project.find(1)
+ project.default_version_id = 3
+ project.save!
+
+ @request.session[:user_id] = 2
+
+ get :settings, :params => {
+ :id => 'ecookbook',
+ :tab => 'versions',
+ }
+ assert_response :success
+
+ assert_select 'table.versions tbody' do
+ # asserts that only one version is marked as default
+ assert_select 'td.tick span.icon-checked', 1
+ # asserts which version is marked as default
+ assert_select 'tr:first-child td.tick span.icon-checked', 1
+ end
+ end
+
def test_settings_should_show_locked_members
user = User.generate!
member = User.add_to_project(user, Project.find(1))