summaryrefslogtreecommitdiffstats
path: root/test/unit/issue_relation_test.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-11-29 12:48:15 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-11-29 12:48:15 +0000
commitd722bb5313fac860b9029b8c5f09c9dddf20b167 (patch)
tree5a548696f0aa726a3f6e3c440b774bddc266a329 /test/unit/issue_relation_test.rb
parent90748779df27365925b8c84d7c211af05eb4b4be (diff)
downloadredmine-d722bb5313fac860b9029b8c5f09c9dddf20b167.tar.gz
redmine-d722bb5313fac860b9029b8c5f09c9dddf20b167.zip
fix source indent of test/unit/issue_relation_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20514 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/issue_relation_test.rb')
-rw-r--r--test/unit/issue_relation_test.rb78
1 files changed, 44 insertions, 34 deletions
diff --git a/test/unit/issue_relation_test.rb b/test/unit/issue_relation_test.rb
index 35a81ffb2..f2cf39dcc 100644
--- a/test/unit/issue_relation_test.rb
+++ b/test/unit/issue_relation_test.rb
@@ -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