Commit 048859b8 authored by Justin Ho's avatar Justin Ho

Remove conditions for PivotalTracker

parent b545d3a9
...@@ -71,18 +71,8 @@ module Integrations ...@@ -71,18 +71,8 @@ module Integrations
end end
end end
def activate_disabled_reason
{ trackers: external_issue_trackers } if external_issue_trackers.any?
end
private private
def external_issue_trackers
return [] unless project_level?
@external_issue_trackers ||= project.integrations.external_issue_trackers
end
def allowed_branch?(ref) def allowed_branch?(ref)
return true unless ref.present? && restrict_to_branch.present? return true unless ref.present? && restrict_to_branch.present?
......
...@@ -93,22 +93,4 @@ RSpec.describe Integrations::Pivotaltracker do ...@@ -93,22 +93,4 @@ RSpec.describe Integrations::Pivotaltracker do
end end
end end
end end
describe '#activate_disabled_reason' do
let(:integration) { build(:pivotaltracker_integration, project: project) }
let_it_be_with_refind(:project) { create :project }
subject { integration.activate_disabled_reason }
context 'when there is an external issue tracker integration' do
let_it_be(:custom_tracker) { create(:custom_issue_tracker_integration, project: project) }
it { is_expected.to eq(trackers: [custom_tracker]) }
end
context 'when there is no external issue tracker integration' do
it { is_expected.to be(nil) }
end
end
end end
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