BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
7421c08a
Commit
7421c08a
authored
Sep 29, 2016
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better tests for MergeRequestDiff#compare_with method
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
cdcc11d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
merge_request_diff_spec.rb
spec/models/merge_request_diff_spec.rb
+8
-2
No files found.
spec/models/merge_request_diff_spec.rb
View file @
7421c08a
...
...
@@ -99,12 +99,18 @@ describe MergeRequestDiff, models: true do
end
describe
'#compare_with'
do
subject
{
create
(
:merge_request
).
merge_request_diff
}
subject
{
create
(
:merge_request
,
source_branch:
'fix'
).
merge_request_diff
}
it
'delegates compare to the service'
do
expect
(
CompareService
).
to
receive
(
:new
).
and_call_original
subject
.
compare_with
(
'ae73cb07c9eeaf35924a10f713b364d32b2dd34f'
)
subject
.
compare_with
(
nil
)
end
it
'uses git diff A..B approach by default'
do
diffs
=
subject
.
compare_with
(
'0b4bc9a49b562e85de7cc9e834518ea6828729b9'
).
diffs
expect
(
diffs
.
size
).
to
eq
(
3
)
end
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