Method is nowhere used and is less specific than is_impediment? in issue

pull/6827/head
Gregor Schmidt 13 years ago
parent ec385408d1
commit ea9d2e6548
  1. 4
      app/models/task.rb
  2. 54
      spec/models/tasks_spec.rb

@ -49,10 +49,6 @@ class Task < Issue
self.remaining_hours = 0 if IssueStatus.find(id).is_closed?
end
def impediment?
parent_issue_id.nil?
end
def update_with_relationships(params, is_impediment = false)
attribs = params.reject { |k, v| !safe_attribute_names.include?(k.to_s) }

@ -1,54 +0,0 @@
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe Task do
let(:user) { @user ||= Factory.create(:user) }
let(:tracker_feature) { @tracker_feature ||= Factory.create(:tracker_feature) }
let(:tracker_task) { @tracker_task ||= Factory.create(:tracker_task) }
let(:issue_priority) { @issue_priority ||= Factory.create(:priority) }
let(:task) { Factory.build(:task, :tracker => tracker_task,
:project => project,
:author => user,
:priority => issue_priority,
:status => issue_status) }
let(:feature) { Factory.build(:issue, :tracker => tracker_feature,
:project => project,
:author => user,
:priority => issue_priority,
:status => issue_status) }
let(:version) { @version ||= Factory.create(:version, :project => project) }
let(:project) { @project ||= Factory.create(:project) }
let(:issue_status) { @status ||= Factory.create(:issue_status) }
before(:each) do
Setting.plugin_redmine_backlogs = {"points_burn_direction" => "down",
"wiki_template" => "",
"card_spec" => "Sattleford VM-5040",
:story_trackers => [tracker_feature.id.to_s],
:task_tracker => tracker_task.id.to_s }
end
describe "Instance Methods" do
before(:each) do
end
describe :impediment? do
describe "WITHOUT parent" do
before(:each) do
end
it { task.should be_impediment }
end
describe "WITH parent" do
before(:each) do
feat = feature
feat.save
task.parent_issue_id = feat.id
end
it { task.should_not be_impediment }
end
end
end
end
Loading…
Cancel
Save