Commit b5f9709c authored by Walmyr Lima's avatar Walmyr Lima

Part 2 of project milestone resource refactoring

This commit moves attributes of a project milestone resource to the
main class so that the EE one can inherit it, and focus only on EE
specific stuff.

And one of the attributes is being removed since it wasn't in use.

Also, it prefers to be explicit about how fabrication happens (via
API) than being implicit (fabricate!)

Finally, this change saves us six lines of code.
parent 50d7444c
......@@ -6,15 +6,6 @@ module QA
class ProjectMilestone < QA::Resource::ProjectMilestone
attr_writer :start_date, :due_date
attribute :id
attribute :iid
attribute :project do
QA::Resource::Project.fabricate_via_api! do |resource|
resource.name = 'project-with-milestone'
end
end
def api_post_body
{
title: title
......
......@@ -3,10 +3,13 @@
module QA
module Resource
class ProjectMilestone < Base
attribute :id
attribute :title
attribute :project do
Project.fabricate!
Project.fabricate_via_api! do |resource|
resource.name = 'project-with-milestone'
end
end
def initialize
......
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