| ... | ... | @@ -55,11 +55,6 @@ describe Git::ProcessRefChangesService do |
|
|
|
stub_application_setting(push_event_hooks_limit: push_event_hooks_limit)
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'git_push_execute_all_project_hooks is disabled' do
|
|
|
|
before do
|
|
|
|
stub_feature_flags(git_push_execute_all_project_hooks: false)
|
|
|
|
end
|
|
|
|
|
|
|
|
it "calls #{push_service_class} with execute_project_hooks set to false" do
|
|
|
|
expect(push_service_class)
|
|
|
|
.to receive(:new)
|
| ... | ... | @@ -71,23 +66,6 @@ describe Git::ProcessRefChangesService do |
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'git_push_execute_all_project_hooks is enabled' do
|
|
|
|
before do
|
|
|
|
stub_feature_flags(git_push_execute_all_project_hooks: true)
|
|
|
|
end
|
|
|
|
|
|
|
|
it "calls #{push_service_class} with execute_project_hooks set to true" do
|
|
|
|
expect(push_service_class)
|
|
|
|
.to receive(:new)
|
|
|
|
.with(project, project.owner, hash_including(execute_project_hooks: true))
|
|
|
|
.exactly(changes.count).times
|
|
|
|
.and_return(service)
|
|
|
|
|
|
|
|
subject.execute
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'changes exceed push_event_activities_limit per action' do
|
|
|
|
let(:push_event_activities_limit) { 3 }
|
|
|
|
|
| ... | ... | |
| ... | ... | |