summaryrefslogtreecommitdiff
path: root/spec/services/git/branch_push_service_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/git/branch_push_service_spec.rb')
-rw-r--r--spec/services/git/branch_push_service_spec.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/services/git/branch_push_service_spec.rb b/spec/services/git/branch_push_service_spec.rb
index bf68eb0af20..febd4992682 100644
--- a/spec/services/git/branch_push_service_spec.rb
+++ b/spec/services/git/branch_push_service_spec.rb
@@ -246,7 +246,7 @@ describe Git::BranchPushService, services: true do
allow(project.repository).to receive(:commits_between).and_return([commit])
end
- it "creates a note if a pushed commit mentions an issue" do
+ it "creates a note if a pushed commit mentions an issue", :sidekiq_might_not_need_inline do
expect(SystemNoteService).to receive(:cross_reference).with(issue, commit, commit_author)
execute_service(project, user, oldrev: oldrev, newrev: newrev, ref: ref)
@@ -260,7 +260,7 @@ describe Git::BranchPushService, services: true do
execute_service(project, user, oldrev: oldrev, newrev: newrev, ref: ref)
end
- it "defaults to the pushing user if the commit's author is not known" do
+ it "defaults to the pushing user if the commit's author is not known", :sidekiq_might_not_need_inline do
allow(commit).to receive_messages(
author_name: 'unknown name',
author_email: 'unknown@email.com'
@@ -270,7 +270,7 @@ describe Git::BranchPushService, services: true do
execute_service(project, user, oldrev: oldrev, newrev: newrev, ref: ref)
end
- it "finds references in the first push to a non-default branch" do
+ it "finds references in the first push to a non-default branch", :sidekiq_might_not_need_inline do
allow(project.repository).to receive(:commits_between).with(blankrev, newrev).and_return([])
allow(project.repository).to receive(:commits_between).with("master", newrev).and_return([commit])
@@ -305,7 +305,7 @@ describe Git::BranchPushService, services: true do
end
context "while saving the 'first_mentioned_in_commit_at' metric for an issue" do
- it 'sets the metric for referenced issues' do
+ it 'sets the metric for referenced issues', :sidekiq_might_not_need_inline do
execute_service(project, user, oldrev: oldrev, newrev: newrev, ref: ref)
expect(issue.reload.metrics.first_mentioned_in_commit_at).to be_like_time(commit_time)
@@ -344,12 +344,12 @@ describe Git::BranchPushService, services: true do
end
context "to default branches" do
- it "closes issues" do
+ it "closes issues", :sidekiq_might_not_need_inline do
execute_service(project, commit_author, oldrev: oldrev, newrev: newrev, ref: ref)
expect(Issue.find(issue.id)).to be_closed
end
- it "adds a note indicating that the issue is now closed" do
+ it "adds a note indicating that the issue is now closed", :sidekiq_might_not_need_inline do
expect(SystemNoteService).to receive(:change_status).with(issue, project, commit_author, "closed", closing_commit)
execute_service(project, commit_author, oldrev: oldrev, newrev: newrev, ref: ref)
end
@@ -366,7 +366,7 @@ describe Git::BranchPushService, services: true do
allow(project).to receive(:default_branch).and_return('not-master')
end
- it "creates cross-reference notes" do
+ it "creates cross-reference notes", :sidekiq_might_not_need_inline do
expect(SystemNoteService).to receive(:cross_reference).with(issue, closing_commit, commit_author)
execute_service(project, user, oldrev: oldrev, newrev: newrev, ref: ref)
end
@@ -407,7 +407,7 @@ describe Git::BranchPushService, services: true do
context "mentioning an issue" do
let(:message) { "this is some work.\n\nrelated to JIRA-1" }
- it "initiates one api call to jira server to mention the issue" do
+ it "initiates one api call to jira server to mention the issue", :sidekiq_might_not_need_inline do
execute_service(project, user, oldrev: oldrev, newrev: newrev, ref: ref)
expect(WebMock).to have_requested(:post, jira_api_comment_url('JIRA-1')).with(
@@ -434,7 +434,7 @@ describe Git::BranchPushService, services: true do
allow_any_instance_of(JIRA::Resource::Issue).to receive(:key).and_return("JIRA-1")
end
- context "using right markdown" do
+ context "using right markdown", :sidekiq_might_not_need_inline do
it "initiates one api call to jira server to close the issue" do
execute_service(project, commit_author, oldrev: oldrev, newrev: newrev, ref: ref)
@@ -473,7 +473,7 @@ describe Git::BranchPushService, services: true do
end
end
- context 'when internal issues are enabled' do
+ context 'when internal issues are enabled', :sidekiq_might_not_need_inline do
let(:issue) { create(:issue, project: project) }
let(:message) { "this is some work.\n\ncloses JIRA-1 \n\n closes #{issue.to_reference}" }