This instance will be upgraded to Heptapod 0.31.0 (final) on 2022-05-24 at 14:00 UTC+2 (a few minutes of down time)

Unverified Commit 9b598fa6 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Fix MR fork validation and services load


Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent b297437346d8
......@@ -127,7 +127,9 @@ def validate_branches
end
def validate_fork
if target_projet == source_project
return true unless target_project && source_project
if target_project == source_project
true
else
# If source and target projects are different
......
module MergeReques
module MergeRequests
class CreateService < MergeRequests::BaseService
def execute
merge_request = MergeRequest.new(params)
......
require_relative 'base_service'
require_relative 'reopen_service'
require_relative 'close_service'
module MergeRequests
class UpdateService < MergeRequests::BaseService
def execute(merge_request)
......
......@@ -53,15 +53,15 @@ def should_not_see(merge_request)
end
def assigned_merge_request
@assigned_merge_request ||= create :merge_request, assignee: current_user, target_project: project
@assigned_merge_request ||= create :merge_request, assignee: current_user, target_project: project, source_project: project
end
def authored_merge_request
@authored_merge_request ||= create :merge_request, author: current_user, target_project: project
@authored_merge_request ||= create :merge_request, source_branch: 'simple_merge_request', author: current_user, target_project: project, source_project: project
end
def other_merge_request
@other_merge_request ||= create :merge_request, target_project: project
@other_merge_request ||= create :merge_request, source_branch: '2_3_notes_fix', target_project: project, source_project: project
end
def project
......
......@@ -52,6 +52,4 @@
RSpec::Mocks::setup self
include FactoryGirl::Syntax::Methods
MergeRequestObserver.any_instance.stub(current_user: create(:user))
end
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