Rename MattermostNotificationService back to MattermostService

parent fed29117
......@@ -94,7 +94,7 @@ class Project < ActiveRecord::Base
has_one :asana_service, dependent: :destroy
has_one :gemnasium_service, dependent: :destroy
has_one :mattermost_slash_commands_service, dependent: :destroy
has_one :mattermost_notification_service, dependent: :destroy
has_one :mattermost_service, dependent: :destroy
has_one :slack_slash_commands_service, dependent: :destroy
has_one :slack_service, dependent: :destroy
has_one :buildkite_service, dependent: :destroy
......
class MattermostNotificationService < ChatNotificationService
class MattermostService < ChatNotificationService
def title
'Mattermost notifications'
end
......@@ -8,7 +8,7 @@ class MattermostNotificationService < ChatNotificationService
end
def to_param
'mattermost_notification'
'mattermost'
end
def help
......
......@@ -216,7 +216,7 @@ class Service < ActiveRecord::Base
jira
kubernetes
mattermost_slash_commands
mattermost_notification
mattermost
pipelines_email
pivotaltracker
pushover
......
......@@ -500,7 +500,7 @@ module API
desc: 'The channel name'
}
],
'mattermost-notification' => [
'mattermost' => [
{
required: true,
name: :webhook,
......
......@@ -138,7 +138,7 @@ project:
- asana_service
- gemnasium_service
- slack_service
- mattermost_notification_service
- mattermost_service
- buildkite_service
- bamboo_service
- teamcity_service
......
require 'spec_helper'
describe MattermostNotificationService, models: true do
describe MattermostService, models: true do
it_behaves_like "slack or mattermost notifications"
end
......@@ -22,7 +22,7 @@ describe Project, models: true do
it { is_expected.to have_many(:protected_branches).dependent(:destroy) }
it { is_expected.to have_one(:forked_project_link).dependent(:destroy) }
it { is_expected.to have_one(:slack_service).dependent(:destroy) }
it { is_expected.to have_one(:mattermost_notification_service).dependent(:destroy) }
it { is_expected.to have_one(:mattermost_service).dependent(:destroy) }
it { is_expected.to have_one(:pushover_service).dependent(:destroy) }
it { is_expected.to have_one(:asana_service).dependent(:destroy) }
it { is_expected.to have_many(:boards).dependent(:destroy) }
......
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