Rename MattermostNotificationService back to MattermostService

parent d9b29d37
...@@ -89,7 +89,7 @@ class Project < ActiveRecord::Base ...@@ -89,7 +89,7 @@ class Project < ActiveRecord::Base
has_one :asana_service, dependent: :destroy has_one :asana_service, dependent: :destroy
has_one :gemnasium_service, dependent: :destroy has_one :gemnasium_service, dependent: :destroy
has_one :mattermost_slash_commands_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_service, dependent: :destroy has_one :slack_service, dependent: :destroy
has_one :jenkins_service, dependent: :destroy has_one :jenkins_service, dependent: :destroy
has_one :jenkins_deprecated_service, dependent: :destroy has_one :jenkins_deprecated_service, dependent: :destroy
......
class MattermostNotificationService < ChatNotificationService class MattermostService < ChatNotificationService
def title def title
'Mattermost notifications' 'Mattermost notifications'
end end
...@@ -8,7 +8,7 @@ class MattermostNotificationService < ChatNotificationService ...@@ -8,7 +8,7 @@ class MattermostNotificationService < ChatNotificationService
end end
def to_param def to_param
'mattermost_notification' 'mattermost'
end end
def help def help
......
...@@ -222,7 +222,7 @@ class Service < ActiveRecord::Base ...@@ -222,7 +222,7 @@ class Service < ActiveRecord::Base
pivotaltracker pivotaltracker
pushover pushover
redmine redmine
mattermost_notification mattermost
slack slack
teamcity teamcity
] ]
......
...@@ -492,7 +492,7 @@ module API ...@@ -492,7 +492,7 @@ module API
desc: 'The channel name' desc: 'The channel name'
} }
], ],
'mattermost-notification' => [ 'mattermost' => [
{ {
required: true, required: true,
name: :webhook, name: :webhook,
......
...@@ -145,8 +145,8 @@ project: ...@@ -145,8 +145,8 @@ project:
- assembla_service - assembla_service
- asana_service - asana_service
- gemnasium_service - gemnasium_service
- mattermost_notification_service
- slack_service - slack_service
- mattermost_service
- buildkite_service - buildkite_service
- bamboo_service - bamboo_service
- teamcity_service - teamcity_service
......
require 'spec_helper' require 'spec_helper'
describe MattermostNotificationService, models: true do describe MattermostService, models: true do
it_behaves_like "slack or mattermost" it_behaves_like "slack or mattermost"
end end
...@@ -22,8 +22,8 @@ describe Project, models: true do ...@@ -22,8 +22,8 @@ describe Project, models: true do
it { is_expected.to have_many(:protected_branches).dependent(:destroy) } it { is_expected.to have_many(:protected_branches).dependent(:destroy) }
it { is_expected.to have_many(:chat_services) } it { is_expected.to have_many(:chat_services) }
it { is_expected.to have_one(:forked_project_link).dependent(:destroy) } it { is_expected.to have_one(:forked_project_link).dependent(:destroy) }
it { is_expected.to have_one(:mattermost_notification_service).dependent(:destroy) }
it { is_expected.to have_one(:slack_service).dependent(:destroy) } it { is_expected.to have_one(:slack_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(:pushover_service).dependent(:destroy) }
it { is_expected.to have_one(:asana_service).dependent(:destroy) } it { is_expected.to have_one(:asana_service).dependent(:destroy) }
it { is_expected.to have_many(:boards).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