Commit a23b2e05 authored by James Fargher's avatar James Fargher

Fix ChatOps Slack responder for gitlab.com

The responder method can only exist on a Service model subclass
parent a3cd7259
......@@ -40,4 +40,8 @@ class GitlabSlackApplicationService < Service
def fields
[]
end
def chat_responder
Gitlab::Chat::Responder::Slack
end
end
......@@ -30,10 +30,6 @@ module Projects
success
end
def chat_responder
Gitlab::Chat::Responder::Slack
end
private
# rubocop: disable CodeReuse/ActiveRecord
......
---
title: Fix ChatOps Slack responder for gitlab.com
merge_request: 10416
author:
type: fixed
# frozen_string_literal: true
require 'spec_helper'
describe GitlabSlackApplicationService do
describe '#chat_responder' do
it 'returns the chat responder to use' do
expect(subject.chat_responder).to eq(Gitlab::Chat::Responder::Slack)
end
end
end
......@@ -46,12 +46,4 @@ describe Projects::SlackApplicationInstallService do
expect_slack_integration_is_created(project)
expect_chat_name_is_created(project)
end
describe '#chat_responder' do
it 'returns the chat responder to use' do
srv = service
expect(srv.chat_responder).to eq(Gitlab::Chat::Responder::Slack)
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