]> source.dussan.org Git - redmine.git/commitdiff
code layout clean up test_required_attribute_names_for_multiple_roles_should_intersec...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 13 Oct 2012 11:17:43 +0000 (11:17 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 13 Oct 2012 11:17:43 +0000 (11:17 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10648 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/issue_test.rb

index 9e8c2044a98478eef133f4f75d564fa7ee5f898b..84a33a0c7f21eb0dca1daf43a386550e7a8eb380 100644 (file)
@@ -672,8 +672,12 @@ class IssueTest < ActiveSupport::TestCase
 
   def test_required_attribute_names_for_multiple_roles_should_intersect_rules
     WorkflowPermission.delete_all
-    WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => 'due_date', :rule => 'required')
-    WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => 'start_date', :rule => 'required')
+    WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1,
+                               :role_id => 1, :field_name => 'due_date',
+                               :rule => 'required')
+    WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1,
+                               :role_id => 1, :field_name => 'start_date',
+                               :rule => 'required')
     user = User.find(2)
     member = Member.find(1)
     issue = Issue.new(:project_id => 1, :tracker_id => 1, :status_id => 1)
@@ -684,14 +688,18 @@ class IssueTest < ActiveSupport::TestCase
     member.save!
     assert_equal [], issue.required_attribute_names(user.reload)
 
-    WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 2, :field_name => 'due_date', :rule => 'required')
+    WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1,
+                               :role_id => 2, :field_name => 'due_date',
+                               :rule => 'required')
     assert_equal %w(due_date), issue.required_attribute_names(user)
 
     member.role_ids = [1, 2, 3]
     member.save!
     assert_equal [], issue.required_attribute_names(user.reload)
 
-    WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 2, :field_name => 'due_date', :rule => 'readonly')
+    WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1,
+                               :role_id => 2, :field_name => 'due_date',
+                               :rule => 'readonly')
     # required + readonly => required
     assert_equal %w(due_date), issue.required_attribute_names(user)
   end