[#4184] An Issue belongs to a Deliverable.
This commit is contained in:
1 parent
cb3fe1a18f
commit
279ed4c206
3 files changed
+32
No files matched your search
@@ -61,6 +61,8 @@ Dispatcher.to_prepare :redmine_contracts do
|
|||||||
|
|
||||||
require_dependency 'project'
|
require_dependency 'project'
|
||||||
Project.send(:include, RedmineContracts::Patches::ProjectPatch)
|
Project.send(:include, RedmineContracts::Patches::ProjectPatch)
|
||||||
|
require_dependency 'issue'
|
||||||
|
Issue.send(:include, RedmineContracts::Patches::IssuePatch)
|
||||||
end
|
end
|
||||||
|
|
||||||
require 'redmine_contracts/hooks/view_layouts_base_html_head_hook'
|
require 'redmine_contracts/hooks/view_layouts_base_html_head_hook'
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
module RedmineContracts
|
||||||
|
module Patches
|
||||||
|
module IssuePatch
|
||||||
|
def self.included(base)
|
||||||
|
base.extend(ClassMethods)
|
||||||
|
|
||||||
|
base.send(:include, InstanceMethods)
|
||||||
|
base.class_eval do
|
||||||
|
unloadable
|
||||||
|
belongs_to :deliverable
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
module ClassMethods
|
||||||
|
end
|
||||||
|
|
||||||
|
module InstanceMethods
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
require File.dirname(__FILE__) + '/../../../../test_helper'
|
||||||
|
|
||||||
|
class RedmineContracts::Patches::IssueTest < ActionController::TestCase
|
||||||
|
|
||||||
|
context "Issue" do
|
||||||
|
subject { Issue.new }
|
||||||
|
should_belong_to :deliverable
|
||||||
|
end
|
||||||
|
end
|
||||||
Reference in new issue
Block a user