Skip to content
Snippets Groups Projects
Commit d454486f authored by Mayra Cabrera's avatar Mayra Cabrera
Browse files

Merge branch '201855-rename-project_services_to_integrations-4' into 'master'

Move Jira integration model to `Integrations::` namespace [RUN AS-IF-FOSS] [RUN ALL RSPEC]

See merge request gitlab-org/gitlab!61743
parents 6c203b47 eade74bf
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -17,14 +17,14 @@
let_it_be(:group) { create(:group) }
let_it_be(:subgroup) { create(:group, parent: group) }
let_it_be(:group_integration) do
JiraService.create!(
Integrations::Jira.create!(
group: group,
url: 'http://group.jira.com'
)
end
 
let_it_be(:subgroup_integration) do
JiraService.create!(
Integrations::Jira.create!(
inherit_from_id: group_integration.id,
group: subgroup,
url: 'http://subgroup.jira.com',
Loading
Loading
@@ -33,7 +33,7 @@
end
 
let_it_be(:excluded_integration) do
JiraService.create!(
Integrations::Jira.create!(
group: create(:group),
url: 'http://another.jira.com',
push_events: false
Loading
Loading
@@ -41,7 +41,7 @@
end
 
let_it_be(:integration) do
JiraService.create!(
Integrations::Jira.create!(
project: create(:project, group: subgroup),
inherit_from_id: subgroup_integration.id,
url: 'http://project.jira.com',
Loading
Loading
Loading
Loading
@@ -181,7 +181,7 @@
commit = double('commit', safe_message: "Fixes #{jira_issue.to_reference}")
allow(merge_request).to receive(:commits).and_return([commit])
 
expect_any_instance_of(JiraService).to receive(:close_issue).with(merge_request, jira_issue, user).once
expect_any_instance_of(Integrations::Jira).to receive(:close_issue).with(merge_request, jira_issue, user).once
 
service.execute(merge_request)
end
Loading
Loading
@@ -193,7 +193,7 @@
commit = double('commit', safe_message: "Fixes #{jira_issue.to_reference}")
allow(merge_request).to receive(:commits).and_return([commit])
 
expect_any_instance_of(JiraService).not_to receive(:close_issue)
expect_any_instance_of(Integrations::Jira).not_to receive(:close_issue)
 
service.execute(merge_request)
end
Loading
Loading
Loading
Loading
@@ -3,7 +3,7 @@
 
RSpec.describe ProjectServiceWorker, '#perform' do
let(:worker) { described_class.new }
let(:service) { JiraService.new }
let(:service) { Integrations::Jira.new }
 
before do
allow(Integration).to receive(:find).and_return(service)
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