summaryrefslogtreecommitdiffstats
path: root/test/unit/tracker_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-07-15 14:12:17 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-07-15 14:12:17 +0000
commitd7b669e50b1c863b748231dc8fb66a692a33cdd1 (patch)
tree59001bb1ae7cb03a9c8ce92e8ffb9b874c56f4af /test/unit/tracker_test.rb
parent54d55a360a21569b4a76070b52177e778d5521c7 (diff)
downloadredmine-d7b669e50b1c863b748231dc8fb66a692a33cdd1.tar.gz
redmine-d7b669e50b1c863b748231dc8fb66a692a33cdd1.zip
Workflow enhancement: editable and required fields configurable by role, tracker and status (#703, #3521).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9977 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/tracker_test.rb')
-rw-r--r--test/unit/tracker_test.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/unit/tracker_test.rb b/test/unit/tracker_test.rb
index 91b259827..e1b1663e8 100644
--- a/test/unit/tracker_test.rb
+++ b/test/unit/tracker_test.rb
@@ -30,20 +30,20 @@ class TrackerTest < ActiveSupport::TestCase
def test_copy_workflows
source = Tracker.find(1)
- assert_equal 89, source.workflows.size
+ assert_equal 89, source.workflow_rules.size
target = Tracker.new(:name => 'Target')
assert target.save
- target.workflows.copy(source)
+ target.workflow_rules.copy(source)
target.reload
- assert_equal 89, target.workflows.size
+ assert_equal 89, target.workflow_rules.size
end
def test_issue_statuses
tracker = Tracker.find(1)
- Workflow.delete_all
- Workflow.create!(:role_id => 1, :tracker_id => 1, :old_status_id => 2, :new_status_id => 3)
- Workflow.create!(:role_id => 2, :tracker_id => 1, :old_status_id => 3, :new_status_id => 5)
+ WorkflowTransition.delete_all
+ WorkflowTransition.create!(:role_id => 1, :tracker_id => 1, :old_status_id => 2, :new_status_id => 3)
+ WorkflowTransition.create!(:role_id => 2, :tracker_id => 1, :old_status_id => 3, :new_status_id => 5)
assert_kind_of Array, tracker.issue_statuses
assert_kind_of IssueStatus, tracker.issue_statuses.first
@@ -51,7 +51,7 @@ class TrackerTest < ActiveSupport::TestCase
end
def test_issue_statuses_empty
- Workflow.delete_all("tracker_id = 1")
+ WorkflowTransition.delete_all("tracker_id = 1")
assert_equal [], Tracker.find(1).issue_statuses
end