Commit c92076a2 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'rename-vulnerability-feedback-module' into 'master'

Remove "Module" from vulnerability feedback module name

See merge request gitlab-org/gitlab-ee!13935
parents b03dbecc a2badb97
......@@ -29,7 +29,7 @@ class Projects::VulnerabilityFeedbackController < Projects::ApplicationControlle
# rubocop: enable CodeReuse/ActiveRecord
def create
service = VulnerabilityFeedbackModule::CreateService.new(project, current_user, vulnerability_feedback_params)
service = VulnerabilityFeedback::CreateService.new(project, current_user, vulnerability_feedback_params)
result = service.execute
if result[:status] == :success
......@@ -40,7 +40,7 @@ class Projects::VulnerabilityFeedbackController < Projects::ApplicationControlle
end
def destroy
service = VulnerabilityFeedbackModule::DestroyService.new(project, current_user, vulnerability_feedback)
service = VulnerabilityFeedback::DestroyService.new(project, current_user, vulnerability_feedback)
service.execute
head :no_content
......
# frozen_string_literal: true
module VulnerabilityFeedbackModule
module VulnerabilityFeedback
class CreateService < ::BaseService
def execute
vulnerability_feedback = @project.vulnerability_feedback.find_or_init_for(create_params)
......
# frozen_string_literal: true
module VulnerabilityFeedbackModule
module VulnerabilityFeedback
class DestroyService < ::BaseService
def initialize(project, user, vulnerability_feedback)
@project, @current_user, @vulnerability_feedback = project, user, vulnerability_feedback
......
......@@ -115,7 +115,7 @@ describe Projects::VulnerabilityFeedbackController do
context 'with valid params' do
it 'returns the created feedback' do
allow(VulnerabilityFeedbackModule::CreateService)
allow(VulnerabilityFeedback::CreateService)
.to receive(:new).with(project, user, ActionController::Parameters.new(create_params).permit!)
.and_call_original
......
require 'spec_helper'
describe VulnerabilityFeedbackModule::CreateService, '#execute' do
describe VulnerabilityFeedback::CreateService, '#execute' do
let(:group) { create(:group) }
let(:project) { create(:project, :public, :repository, namespace: group) }
let(:user) { create(:user) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe VulnerabilityFeedbackModule::DestroyService, '#execute' do
describe VulnerabilityFeedback::DestroyService, '#execute' do
let(:group) { create(:group) }
let(:project) { create(:project, :public, :repository, namespace: group) }
let(:user) { create(:user) }
......
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