summaryrefslogtreecommitdiffstats
path: root/test/object_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/object_helpers.rb')
-rw-r--r--test/object_helpers.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/object_helpers.rb b/test/object_helpers.rb
index 9cb0916f7..1f58baf9e 100644
--- a/test/object_helpers.rb
+++ b/test/object_helpers.rb
@@ -179,3 +179,16 @@ module ObjectHelpers
changeset
end
end
+
+module IssueObjectHelpers
+ def close!
+ self.status = IssueStatus.where(:is_closed => true).first
+ save!
+ end
+
+ def generate_child!(attributes={})
+ Issue.generate!(attributes.merge(:parent_issue_id => self.id))
+ end
+end
+
+Issue.send :include, IssueObjectHelpers