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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
9338c11f
Commit
9338c11f
authored
Nov 01, 2018
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix merge request specs that expect diff_files to be called
parent
de1db497
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
spec/models/merge_request_diff_spec.rb
spec/models/merge_request_diff_spec.rb
+6
-6
spec/models/merge_request_spec.rb
spec/models/merge_request_spec.rb
+2
-2
No files found.
spec/models/merge_request_diff_spec.rb
View file @
9338c11f
...
...
@@ -52,9 +52,9 @@ describe MergeRequestDiff do
context
'when it was not cleaned by the system'
do
it
'returns persisted diffs'
do
expect
(
diff
).
to
receive
(
:load_diffs
)
expect
(
diff
).
to
receive
(
:load_diffs
)
.
and_call_original
diff
.
diffs
diff
.
diffs
.
diff_files
end
end
...
...
@@ -76,19 +76,19 @@ describe MergeRequestDiff do
end
it
'returns persisted diffs if cannot compare with diff refs'
do
expect
(
diff
).
to
receive
(
:load_diffs
)
expect
(
diff
).
to
receive
(
:load_diffs
)
.
and_call_original
diff
.
update!
(
head_commit_sha:
'invalid-sha'
)
diff
.
diffs
diff
.
diffs
.
diff_files
end
it
'returns persisted diffs if diff refs does not exist'
do
expect
(
diff
).
to
receive
(
:load_diffs
)
expect
(
diff
).
to
receive
(
:load_diffs
)
.
and_call_original
diff
.
update!
(
start_commit_sha:
nil
,
base_commit_sha:
nil
)
diff
.
diffs
diff
.
diffs
.
diff_files
end
end
end
...
...
spec/models/merge_request_spec.rb
View file @
9338c11f
...
...
@@ -538,9 +538,9 @@ describe MergeRequest do
it
'delegates to the MR diffs'
do
merge_request
.
save
expect
(
merge_request
.
merge_request_diff
).
to
receive
(
:raw_diffs
).
with
(
hash_including
(
options
))
expect
(
merge_request
.
merge_request_diff
).
to
receive
(
:raw_diffs
).
with
(
hash_including
(
options
))
.
and_call_original
merge_request
.
diffs
(
options
)
merge_request
.
diffs
(
options
)
.
diff_files
end
end
...
...
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