Commit c388ca88 authored by Alex Kalderimis's avatar Alex Kalderimis

Rename packagist integration from service

Renames project association from packagist_service to
packagist_integration.
parent f4c12321
...@@ -48,6 +48,7 @@ class Integration < ApplicationRecord ...@@ -48,6 +48,7 @@ class Integration < ApplicationRecord
flowdock flowdock
hangouts_chat hangouts_chat
irker irker
packagist
].to_set.freeze ].to_set.freeze
def self.renamed?(name) def self.renamed?(name)
......
...@@ -178,7 +178,7 @@ class Project < ApplicationRecord ...@@ -178,7 +178,7 @@ class Project < ApplicationRecord
has_one :mattermost_slash_commands_service, class_name: 'Integrations::MattermostSlashCommands' has_one :mattermost_slash_commands_service, class_name: 'Integrations::MattermostSlashCommands'
has_one :microsoft_teams_service, class_name: 'Integrations::MicrosoftTeams' has_one :microsoft_teams_service, class_name: 'Integrations::MicrosoftTeams'
has_one :mock_ci_service, class_name: 'Integrations::MockCi' has_one :mock_ci_service, class_name: 'Integrations::MockCi'
has_one :packagist_service, class_name: 'Integrations::Packagist' has_one :packagist_integration, class_name: 'Integrations::Packagist'
has_one :pipelines_email_service, class_name: 'Integrations::PipelinesEmail' has_one :pipelines_email_service, class_name: 'Integrations::PipelinesEmail'
has_one :pivotaltracker_service, class_name: 'Integrations::Pivotaltracker' has_one :pivotaltracker_service, class_name: 'Integrations::Pivotaltracker'
has_one :pushover_service, class_name: 'Integrations::Pushover' has_one :pushover_service, class_name: 'Integrations::Pushover'
......
...@@ -371,7 +371,7 @@ project: ...@@ -371,7 +371,7 @@ project:
- mattermost_slash_commands_service - mattermost_slash_commands_service
- slack_slash_commands_service - slack_slash_commands_service
- irker_integration - irker_integration
- packagist_service - packagist_integration
- pivotaltracker_service - pivotaltracker_service
- prometheus_service - prometheus_service
- flowdock_integration - flowdock_integration
......
...@@ -33,14 +33,14 @@ RSpec.describe Integrations::Packagist do ...@@ -33,14 +33,14 @@ RSpec.describe Integrations::Packagist do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:push_sample_data) { Gitlab::DataBuilder::Push.build_sample(project, user) } let(:push_sample_data) { Gitlab::DataBuilder::Push.build_sample(project, user) }
let(:packagist_service) { described_class.create!(packagist_params) } let(:packagist_integration) { described_class.create!(packagist_params) }
before do before do
stub_request(:post, packagist_hook_url) stub_request(:post, packagist_hook_url)
end end
it 'calls Packagist API' do it 'calls Packagist API' do
packagist_service.execute(push_sample_data) packagist_integration.execute(push_sample_data)
expect(a_request(:post, packagist_hook_url)).to have_been_made.once expect(a_request(:post, packagist_hook_url)).to have_been_made.once
end end
......
...@@ -41,7 +41,7 @@ RSpec.describe Project, factory_default: :keep do ...@@ -41,7 +41,7 @@ RSpec.describe Project, factory_default: :keep do
it { is_expected.to have_one(:hangouts_chat_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(:unify_circuit_service) }
it { is_expected.to have_one(:webex_teams_service) } it { is_expected.to have_one(:webex_teams_service) }
it { is_expected.to have_one(:packagist_service) } it { is_expected.to have_one(:packagist_integration) }
it { is_expected.to have_one(:pushover_service) } it { is_expected.to have_one(:pushover_service) }
it { is_expected.to have_one(:asana_integration) } it { is_expected.to have_one(:asana_integration) }
it { is_expected.to have_many(:boards) } it { is_expected.to have_many(:boards) }
......
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