summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-02-26 08:37:54 +0000
committerGo MAEDA <maeda@farend.jp>2019-02-26 08:37:54 +0000
commit0f94768f09fc15855d3b4ab6053d1f27d1d96044 (patch)
tree9e36cdb8c4742c5dda719166ee787852fbf65393 /test
parent5102a7e16b9c745412a124c6a0e6e0908c467ff8 (diff)
downloadredmine-0f94768f09fc15855d3b4ab6053d1f27d1d96044.tar.gz
redmine-0f94768f09fc15855d3b4ab6053d1f27d1d96044.zip
Show warning when no workflow uses the status in the workflows (#30916).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@17903 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/functional/issue_statuses_controller_test.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/functional/issue_statuses_controller_test.rb b/test/functional/issue_statuses_controller_test.rb
index d36dd4559..1825960a0 100644
--- a/test/functional/issue_statuses_controller_test.rb
+++ b/test/functional/issue_statuses_controller_test.rb
@@ -43,6 +43,21 @@ class IssueStatusesControllerTest < Redmine::ControllerTest
assert_response 406
end
+ def test_index_should_show_warning_when_no_workflow_is_defined
+ status = IssueStatus.new :name => "No workflow"
+ status.save!
+
+ get :index
+ assert_response :success
+ assert_select 'table.issue_statuses tbody' do
+ assert_select 'tr:not(:last-of-type) span.icon-warning', :count => 0
+ assert_select 'tr:last-of-type' do
+ assert_select 'td.name', :text => status.name
+ assert_select 'td:nth-of-type(3) span.icon-warning', :text => /#{I18n.t(:text_status_no_workflow)}/
+ end
+ end
+ end
+
def test_new
get :new
assert_response :success