Commit 43697d06 authored by Alex Kalderimis's avatar Alex Kalderimis

Rename campfire service

Renames `campfire_service` to `campfire_integration`
parent 7adb9d45
......@@ -42,6 +42,7 @@ class Integration < ApplicationRecord
RENAMED_TO_INTEGRATION = %w[
asana assembla
bamboo bugzilla buildkite
campfire
].to_set.freeze
serialize :properties, JSON # rubocop:disable Cop/ActiveRecordSerialize
......
......@@ -160,7 +160,7 @@ class Project < ApplicationRecord
has_one :bamboo_integration, class_name: 'Integrations::Bamboo'
has_one :bugzilla_integration, class_name: 'Integrations::Bugzilla'
has_one :buildkite_integration, class_name: 'Integrations::Buildkite'
has_one :campfire_service, class_name: 'Integrations::Campfire'
has_one :campfire_integration, class_name: 'Integrations::Campfire'
has_one :confluence_service, class_name: 'Integrations::Confluence'
has_one :custom_issue_tracker_service, class_name: 'Integrations::CustomIssueTracker'
has_one :datadog_service, class_name: 'Integrations::Datadog'
......
......@@ -362,7 +362,7 @@ project:
- boards
- last_event
- integrations
- campfire_service
- campfire_integration
- confluence_service
- datadog_service
- discord_service
......
......@@ -33,8 +33,8 @@ RSpec.describe Integrations::Campfire do
let(:project) { create(:project, :repository) }
before do
@campfire_service = described_class.new
allow(@campfire_service).to receive_messages(
@campfire_integration = described_class.new
allow(@campfire_integration).to receive_messages(
project_id: project.id,
project: project,
service_hook: true,
......@@ -62,7 +62,7 @@ RSpec.describe Integrations::Campfire do
speak_url = 'https://project-name.campfirenow.com/room/123/speak.json'
stub_full_request(speak_url, method: :post).with(basic_auth: @auth)
@campfire_service.execute(@sample_data)
@campfire_integration.execute(@sample_data)
expect(WebMock).to have_requested(:get, stubbed_hostname(@rooms_url)).once
expect(WebMock).to have_requested(:post, stubbed_hostname(speak_url))
......@@ -78,7 +78,7 @@ RSpec.describe Integrations::Campfire do
headers: @headers
)
@campfire_service.execute(@sample_data)
@campfire_integration.execute(@sample_data)
expect(WebMock).to have_requested(:get, 'https://8.8.8.9/rooms.json').once
expect(WebMock).not_to have_requested(:post, '*/room/.*/speak.json')
......
......@@ -45,7 +45,7 @@ RSpec.describe Project, factory_default: :keep do
it { is_expected.to have_one(:pushover_service) }
it { is_expected.to have_one(:asana_integration) }
it { is_expected.to have_many(:boards) }
it { is_expected.to have_one(:campfire_service) }
it { is_expected.to have_one(:campfire_integration) }
it { is_expected.to have_one(:datadog_service) }
it { is_expected.to have_one(:discord_service) }
it { is_expected.to have_one(:drone_ci_service) }
......
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