Commit c23cb516 authored by jplang's avatar jplang

Adds some test helpers to cleanup tests.

git-svn-id: https://svn.redmine.org/redmine/trunk@12746 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 9f3a84e6
......@@ -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
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment