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
Jérome Perrin
gitlab-ce
Commits
4b143e72
Commit
4b143e72
authored
Feb 02, 2018
by
Oswaldo Ferreira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix and improve stubbed test for WIP commit ref
parent
17881606
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
31 deletions
+15
-31
spec/services/merge_requests/refresh_service_spec.rb
spec/services/merge_requests/refresh_service_spec.rb
+15
-31
No files found.
spec/services/merge_requests/refresh_service_spec.rb
View file @
4b143e72
...
@@ -400,37 +400,21 @@ describe MergeRequests::RefreshService do
...
@@ -400,37 +400,21 @@ describe MergeRequests::RefreshService do
end
end
it
'references the commit that caused the Work in Progress status'
do
it
'references the commit that caused the Work in Progress status'
do
refresh_service
.
execute
(
@oldrev
,
@newrev
,
'refs/heads/master'
)
wip_merge_request
=
create
(
:merge_request
,
allow
(
refresh_service
).
to
receive
(
:find_new_commits
)
source_project:
@project
,
refresh_service
.
instance_variable_set
(
"@commits"
,
[
source_branch:
'wip'
,
double
(
target_branch:
'master'
,
id:
'aaaaaaa'
,
target_project:
@project
)
sha:
'38008cb17ce1466d8fec2dfa6f6ab8dcfe5cf49e'
,
short_id:
'aaaaaaa'
,
commits
=
wip_merge_request
.
commits
title:
'Fix issue'
,
oldrev
=
commits
.
last
.
id
work_in_progress?:
false
newrev
=
commits
.
first
.
id
),
wip_commit
=
wip_merge_request
.
commits
.
find
(
&
:work_in_progress?
)
double
(
id:
'bbbbbbb'
,
refresh_service
.
execute
(
oldrev
,
newrev
,
'refs/heads/wip'
)
sha:
'498214de67004b1da3d820901307bed2a68a8ef6'
,
short_id:
'bbbbbbb'
,
expect
(
wip_merge_request
.
reload
.
notes
.
last
.
note
).
to
eq
(
title:
'fixup! Fix issue'
,
"marked as a **Work In Progress** from
#{
wip_commit
.
id
}
"
work_in_progress?:
true
,
to_reference:
'bbbbbbb'
),
double
(
id:
'ccccccc'
,
sha:
'1b12f15a11fc6e62177bef08f47bc7b5ce50b141'
,
short_id:
'ccccccc'
,
title:
'fixup! Fix issue'
,
work_in_progress?:
true
,
to_reference:
'ccccccc'
)
])
refresh_service
.
execute
(
@oldrev
,
@newrev
,
'refs/heads/wip'
)
reload_mrs
expect
(
@merge_request
.
notes
.
last
.
note
).
to
eq
(
"marked as a **Work In Progress** from bbbbbbb"
)
)
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