Skip to content
Snippets Groups Projects
Commit 80c120dc authored by Alexis Kalderimis's avatar Alexis Kalderimis :speech_balloon:
Browse files

Rename mattermost_service to mattermost_integration

This renames the mattermost project association from mattermost_service
to mattermost_integration
parent d2580206
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -49,6 +49,7 @@ class Integration < ApplicationRecord
hangouts_chat
irker
packagist pipelines_email pivotaltracker pushover
mattermost
].to_set.freeze
 
def self.renamed?(name)
Loading
Loading
Loading
Loading
@@ -174,7 +174,7 @@ def self.integration_association_name(name)
has_one :irker_integration, class_name: 'Integrations::Irker'
has_one :jenkins_service, class_name: 'Integrations::Jenkins'
has_one :jira_service, class_name: 'Integrations::Jira'
has_one :mattermost_service, class_name: 'Integrations::Mattermost'
has_one :mattermost_integration, class_name: 'Integrations::Mattermost'
has_one :mattermost_slash_commands_service, class_name: 'Integrations::MattermostSlashCommands'
has_one :microsoft_teams_service, class_name: 'Integrations::MicrosoftTeams'
has_one :mock_ci_service, class_name: 'Integrations::MockCi'
Loading
Loading
Loading
Loading
@@ -379,7 +379,7 @@ project:
- asana_integration
- slack_service
- microsoft_teams_service
- mattermost_service
- mattermost_integration
- hangouts_chat_integration
- unify_circuit_service
- buildkite_integration
Loading
Loading
Loading
Loading
@@ -37,7 +37,7 @@
it { is_expected.to have_many(:exported_protected_branches) }
it { is_expected.to have_one(:slack_service) }
it { is_expected.to have_one(:microsoft_teams_service) }
it { is_expected.to have_one(:mattermost_service) }
it { is_expected.to have_one(:mattermost_integration) }
it { is_expected.to have_one(:hangouts_chat_integration) }
it { is_expected.to have_one(:unify_circuit_service) }
it { is_expected.to have_one(:webex_teams_service) }
Loading
Loading
Loading
Loading
@@ -254,21 +254,21 @@ def deactive_service!
end
end
 
describe 'Mattermost service' do
let(:service_name) { 'mattermost' }
describe 'Mattermost integration' do
let(:integration_name) { 'mattermost' }
let(:params) do
{ webhook: 'https://hook.example.com', username: 'username' }
end
 
before do
project.create_mattermost_service(
project.create_mattermost_integration(
active: true,
properties: params
)
end
 
it 'accepts a username for update' do
put api("/projects/#{project.id}/services/#{service_name}", user), params: params.merge(username: 'new_username')
put api("/projects/#{project.id}/services/#{integration_name}", user), params: params.merge(username: 'new_username')
 
expect(response).to have_gitlab_http_status(:ok)
expect(json_response['properties']['username']).to eq('new_username')
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment