Commit a11fbf0d authored by Justin Ho's avatar Justin Ho

Remove deprecation_message from service

- deprecation_message is nil by default and no child
classes are overwriting the value, thus it is always nil
- Views are now redundant since they won't render
parent 840b1ea5
......@@ -349,10 +349,6 @@ class Service < ApplicationRecord
false
end
def deprecation_message
nil
end
# override if needed
def supports_data_fields?
false
......
.flash-container.flash-container-page
.flash-alert.deprecated-service
%span= @service.deprecation_message
......@@ -2,6 +2,4 @@
- breadcrumb_title @service.title
- page_title @service.title, "Service Templates"
= render 'deprecated_message' if @service.deprecation_message
= render 'form'
.flash-container.flash-container-page
.flash-alert.deprecated-service
%span= @service.deprecation_message
......@@ -2,8 +2,6 @@
- add_to_breadcrumbs _('Integration Settings'), project_settings_integrations_path(@project)
- page_title @service.title, _('Integrations')
= render 'deprecated_message' if @service.deprecation_message
= render 'form'
- if @web_hook_logs
= render partial: 'projects/hook_logs/index', locals: { hook: @service.service_hook, hook_logs: @web_hook_logs, project: @project }
......@@ -2770,8 +2770,6 @@ Service
updates the has_external_issue_tracker boolean
#deprecated?
should return false by default
#deprecation_message
should be empty by default
#api_field_names
filters out sensitive fields
......
......@@ -532,15 +532,6 @@ describe Service do
end
end
describe "#deprecation_message" do
let(:project) { create(:project, :repository) }
it 'is empty by default' do
service = create(:service, project: project)
expect(service.deprecation_message).to be_nil
end
end
describe '#api_field_names' do
let(:fake_service) do
Class.new(Service) do
......
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