Rename MattermostNotificationService back to MattermostService

parent fed29117
...@@ -94,7 +94,7 @@ class Project < ActiveRecord::Base ...@@ -94,7 +94,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_slash_commands_service, dependent: :destroy has_one :slack_slash_commands_service, dependent: :destroy
has_one :slack_service, dependent: :destroy has_one :slack_service, dependent: :destroy
has_one :buildkite_service, dependent: :destroy has_one :buildkite_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
......
...@@ -216,7 +216,7 @@ class Service < ActiveRecord::Base ...@@ -216,7 +216,7 @@ class Service < ActiveRecord::Base
jira jira
kubernetes kubernetes
mattermost_slash_commands mattermost_slash_commands
mattermost_notification mattermost
pipelines_email pipelines_email
pivotaltracker pivotaltracker
pushover pushover
......
...@@ -500,7 +500,7 @@ module API ...@@ -500,7 +500,7 @@ module API
desc: 'The channel name' desc: 'The channel name'
} }
], ],
'mattermost-notification' => [ 'mattermost' => [
{ {
required: true, required: true,
name: :webhook, name: :webhook,
......
...@@ -138,7 +138,7 @@ project: ...@@ -138,7 +138,7 @@ project:
- asana_service - asana_service
- gemnasium_service - gemnasium_service
- slack_service - slack_service
- mattermost_notification_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 notifications" it_behaves_like "slack or mattermost notifications"
end end
...@@ -22,7 +22,7 @@ describe Project, models: true do ...@@ -22,7 +22,7 @@ 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_one(:forked_project_link).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(: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(: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