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
5f00c459
Commit
5f00c459
authored
Feb 01, 2022
by
Kerri Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove WIP usage in related specs
parent
ad67e7e1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
13 deletions
+13
-13
spec/controllers/projects/merge_requests_controller_spec.rb
spec/controllers/projects/merge_requests_controller_spec.rb
+1
-1
spec/features/merge_request/user_resolves_wip_mr_spec.rb
spec/features/merge_request/user_resolves_wip_mr_spec.rb
+2
-2
spec/services/merge_requests/create_service_spec.rb
spec/services/merge_requests/create_service_spec.rb
+5
-5
spec/services/merge_requests/update_service_spec.rb
spec/services/merge_requests/update_service_spec.rb
+3
-3
spec/services/notes/create_service_spec.rb
spec/services/notes/create_service_spec.rb
+2
-2
No files found.
spec/controllers/projects/merge_requests_controller_spec.rb
View file @
5f00c459
...
...
@@ -443,7 +443,7 @@ RSpec.describe Projects::MergeRequestsController do
context
'when the merge request is not mergeable'
do
before
do
merge_request
.
update!
(
title:
"
WIP
:
#{
merge_request
.
title
}
"
)
merge_request
.
update!
(
title:
"
Draft
:
#{
merge_request
.
title
}
"
)
post
:merge
,
params:
base_params
end
...
...
spec/features/merge_request/user_resolves_wip_mr_spec.rb
View file @
5f00c459
...
...
@@ -2,13 +2,13 @@
require
'spec_helper'
RSpec
.
describe
'Merge request > User resolves
Work in Progress
'
,
:js
do
RSpec
.
describe
'Merge request > User resolves
Draft
'
,
:js
do
let
(
:project
)
{
create
(
:project
,
:public
,
:repository
)
}
let
(
:user
)
{
project
.
creator
}
let
(
:merge_request
)
do
create
(
:merge_request_with_diffs
,
source_project:
project
,
author:
user
,
title:
'
WIP
: Bug NS-04'
,
title:
'
Draft
: Bug NS-04'
,
merge_params:
{
force_remove_source_branch:
'1'
})
end
...
...
spec/services/merge_requests/create_service_spec.rb
View file @
5f00c459
...
...
@@ -61,19 +61,19 @@ RSpec.describe MergeRequests::CreateService, :clean_gitlab_redis_shared_state do
expect
(
merge_request
.
reload
).
to
be_preparing
end
describe
'when marked with /
wip
'
do
describe
'when marked with /
draft
'
do
context
'in title and in description'
do
let
(
:opts
)
do
{
title:
'
WIP
: Awesome merge_request'
,
description:
"well this is not done yet
\n
/
wip
"
,
title:
'
Draft
: Awesome merge_request'
,
description:
"well this is not done yet
\n
/
draft
"
,
source_branch:
'feature'
,
target_branch:
'master'
,
assignees:
[
user2
]
}
end
it
'sets MR to
WIP
'
do
it
'sets MR to
draft
'
do
expect
(
merge_request
.
work_in_progress?
).
to
be
(
true
)
end
end
...
...
@@ -89,7 +89,7 @@ RSpec.describe MergeRequests::CreateService, :clean_gitlab_redis_shared_state do
}
end
it
'sets MR to
WIP
'
do
it
'sets MR to
draft
'
do
expect
(
merge_request
.
work_in_progress?
).
to
be
(
true
)
end
end
...
...
spec/services/merge_requests/update_service_spec.rb
View file @
5f00c459
...
...
@@ -102,16 +102,16 @@ RSpec.describe MergeRequests::UpdateService, :mailer do
MergeRequests
::
UpdateService
.
new
(
project:
project
,
current_user:
user
,
params:
opts
).
execute
(
merge_request2
)
end
it
'tracks Draft
/WIP
marking'
do
it
'tracks Draft marking'
do
expect
(
Gitlab
::
UsageDataCounters
::
MergeRequestActivityUniqueCounter
)
.
to
receive
(
:track_marked_as_draft_action
).
once
.
with
(
user:
user
)
opts
[
:title
]
=
"
WIP
:
#{
opts
[
:title
]
}
"
opts
[
:title
]
=
"
Draft
:
#{
opts
[
:title
]
}
"
MergeRequests
::
UpdateService
.
new
(
project:
project
,
current_user:
user
,
params:
opts
).
execute
(
merge_request2
)
end
it
'tracks Draft
/WIP
un-marking'
do
it
'tracks Draft un-marking'
do
expect
(
Gitlab
::
UsageDataCounters
::
MergeRequestActivityUniqueCounter
)
.
to
receive
(
:track_unmarked_as_draft_action
).
once
.
with
(
user:
user
)
...
...
spec/services/notes/create_service_spec.rb
View file @
5f00c459
...
...
@@ -325,11 +325,11 @@ RSpec.describe Notes::CreateService do
expect
(
issuable
.
work_in_progress?
).
to
eq
(
can_use_quick_action
)
}
),
# Remove
WIP
status
# Remove
draft
status
QuickAction
.
new
(
action_text:
"/draft"
,
before_action:
->
{
issuable
.
reload
.
update!
(
title:
"
WIP
: title"
)
issuable
.
reload
.
update!
(
title:
"
Draft
: title"
)
},
expectation:
->
(
noteable
,
can_use_quick_action
)
{
expect
(
noteable
.
work_in_progress?
).
not_to
eq
(
can_use_quick_action
)
...
...
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