Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9a0acc98
Commit
9a0acc98
authored
Nov 07, 2017
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix specs
parent
c93dab47
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
lib/gitlab/import_export/merge_request_parser.rb
lib/gitlab/import_export/merge_request_parser.rb
+1
-1
spec/lib/gitlab/import_export/merge_request_parser_spec.rb
spec/lib/gitlab/import_export/merge_request_parser_spec.rb
+3
-3
No files found.
lib/gitlab/import_export/merge_request_parser.rb
View file @
9a0acc98
...
...
@@ -26,7 +26,7 @@ module Gitlab
end
def
fetch_ref
@project
.
repository
.
fetch_ref
(
@project
.
repository
.
path
,
source_ref:
@diff_head_sha
,
target_ref:
@merge_request
.
source_branch
)
@project
.
repository
.
fetch_ref
(
@project
.
repository
,
source_ref:
@diff_head_sha
,
target_ref:
@merge_request
.
source_branch
)
end
def
branch_exists?
(
branch_name
)
...
...
spec/lib/gitlab/import_export/merge_request_parser_spec.rb
View file @
9a0acc98
...
...
@@ -31,9 +31,9 @@ describe Gitlab::ImportExport::MergeRequestParser do
end
it
'parses a MR that has no source branch'
do
allow_any_instance_of
(
Gitlab
::
ImportExport
::
MergeRequestParser
).
to
receive
(
:branch_exists?
).
and_call_original
allow_any_instance_of
(
Gitlab
::
ImportExport
::
MergeRequestParser
).
to
receive
(
:branch_exists?
).
with
(
merge_request
.
source_branch
).
and_return
(
false
)
allow_any_instance_of
(
Gitlab
::
ImportExport
::
MergeRequestParser
).
to
receive
(
:fork_merge_request?
).
and_return
(
true
)
allow_any_instance_of
(
described_class
).
to
receive
(
:branch_exists?
).
and_call_original
allow_any_instance_of
(
described_class
).
to
receive
(
:branch_exists?
).
with
(
merge_request
.
source_branch
).
and_return
(
false
)
allow_any_instance_of
(
described_class
).
to
receive
(
:fork_merge_request?
).
and_return
(
true
)
allow
(
Gitlab
::
GitalyClient
).
to
receive
(
:migrate
).
and_call_original
allow
(
Gitlab
::
GitalyClient
).
to
receive
(
:migrate
).
with
(
:fetch_ref
).
and_return
([
nil
,
0
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment