]> source.dussan.org Git - redmine.git/commitdiff
fix source indent of test/unit/issue_relation_test.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 29 Nov 2020 12:48:15 +0000 (12:48 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 29 Nov 2020 12:48:15 +0000 (12:48 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@20514 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/issue_relation_test.rb

index 35a81ffb24eda99083ef3dbd1cf73f84172cc194..f2cf39dcc1a0110a6004c744835d6b91aa2496f1 100644 (file)
@@ -122,18 +122,23 @@ class IssueRelationTest < ActiveSupport::TestCase
 
   def test_validates_circular_dependency
     IssueRelation.delete_all
-    assert IssueRelation.create!(
-             :issue_from => Issue.find(1), :issue_to => Issue.find(2),
-             :relation_type => IssueRelation::TYPE_PRECEDES
-           )
-    assert IssueRelation.create!(
-             :issue_from => Issue.find(2), :issue_to => Issue.find(3),
-             :relation_type => IssueRelation::TYPE_PRECEDES
-           )
-    r = IssueRelation.new(
-          :issue_from => Issue.find(3), :issue_to => Issue.find(1),
-          :relation_type => IssueRelation::TYPE_PRECEDES
-        )
+    assert(
+      IssueRelation.create!(
+        :issue_from => Issue.find(1), :issue_to => Issue.find(2),
+        :relation_type => IssueRelation::TYPE_PRECEDES
+      )
+    )
+    assert(
+      IssueRelation.create!(
+        :issue_from => Issue.find(2), :issue_to => Issue.find(3),
+        :relation_type => IssueRelation::TYPE_PRECEDES
+      )
+    )
+    r =
+      IssueRelation.new(
+        :issue_from => Issue.find(3), :issue_to => Issue.find(1),
+        :relation_type => IssueRelation::TYPE_PRECEDES
+      )
     assert !r.save
     assert_not_equal [], r.errors[:base]
   end
@@ -149,11 +154,11 @@ class IssueRelationTest < ActiveSupport::TestCase
     child = Issue.generate!(:parent_issue_id => issue2.id)
     issue1.reload
     child.reload
-
-    r = IssueRelation.new(
-          :issue_from => child, :issue_to => issue1,
-          :relation_type => IssueRelation::TYPE_PRECEDES
-        )
+    r =
+      IssueRelation.new(
+        :issue_from => child, :issue_to => issue1,
+        :relation_type => IssueRelation::TYPE_PRECEDES
+      )
     assert !r.save
     assert_include 'This relation would create a circular dependency', r.errors.full_messages
   end
@@ -162,29 +167,34 @@ class IssueRelationTest < ActiveSupport::TestCase
     parent = Issue.generate!
     child1 = Issue.generate!(:parent_issue_id => parent.id)
     child2 = Issue.generate!(:parent_issue_id => parent.id)
-
-    r = IssueRelation.new(
-          :issue_from => child1, :issue_to => child2,
-          :relation_type => IssueRelation::TYPE_PRECEDES
-        )
+    r =
+      IssueRelation.new(
+        :issue_from => child1, :issue_to => child2,
+        :relation_type => IssueRelation::TYPE_PRECEDES
+      )
     assert r.valid?
     assert r.save
   end
 
   def test_validates_circular_dependency_on_reverse_relations
     IssueRelation.delete_all
-    assert IssueRelation.create!(
-             :issue_from => Issue.find(1), :issue_to => Issue.find(3),
-             :relation_type => IssueRelation::TYPE_BLOCKS
-           )
-    assert IssueRelation.create!(
-             :issue_from => Issue.find(1), :issue_to => Issue.find(2),
-             :relation_type => IssueRelation::TYPE_BLOCKED
-           )
-    r = IssueRelation.new(
-          :issue_from => Issue.find(2), :issue_to => Issue.find(1),
-          :relation_type => IssueRelation::TYPE_BLOCKED
-        )
+    assert(
+      IssueRelation.create!(
+        :issue_from => Issue.find(1), :issue_to => Issue.find(3),
+        :relation_type => IssueRelation::TYPE_BLOCKS
+      )
+    )
+    assert(
+      IssueRelation.create!(
+        :issue_from => Issue.find(1), :issue_to => Issue.find(2),
+        :relation_type => IssueRelation::TYPE_BLOCKED
+      )
+    )
+    r =
+      IssueRelation.new(
+        :issue_from => Issue.find(2), :issue_to => Issue.find(1),
+        :relation_type => IssueRelation::TYPE_BLOCKED
+      )
     assert !r.save
     assert_not_equal [], r.errors[:base]
   end