summaryrefslogtreecommitdiff
path: root/spec/models/commit_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-02-03 18:17:34 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-02-03 18:17:34 +0000
commit0aa20f3dac8e19cc10b62e08a5c84df105a648c2 (patch)
tree3347e2aa05c399d70f82775fa58ffd4b531ba282 /spec/models/commit_spec.rb
parent67daaf4021a180166ad063e3a75ea777e96586a6 (diff)
downloadgitlab-ce-0aa20f3dac8e19cc10b62e08a5c84df105a648c2.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/commit_spec.rb')
-rw-r--r--spec/models/commit_spec.rb16
1 files changed, 5 insertions, 11 deletions
diff --git a/spec/models/commit_spec.rb b/spec/models/commit_spec.rb
index 4d3a2fac0fc..7c67b9a3d63 100644
--- a/spec/models/commit_spec.rb
+++ b/spec/models/commit_spec.rb
@@ -748,29 +748,23 @@ eos
describe '#work_in_progress?' do
[
- 'squash! ', 'fixup! ', 'wip: ', 'WIP: ', '[WIP] ',
+ 'squash! ', 'fixup! ',
'draft: ', '[Draft] ', '(draft) ', 'Draft: '
- ].each do |wip_prefix|
- it "detects the '#{wip_prefix}' prefix" do
- commit.message = "#{wip_prefix}#{commit.message}"
+ ].each do |draft_prefix|
+ it "detects the '#{draft_prefix}' prefix" do
+ commit.message = "#{draft_prefix}#{commit.message}"
expect(commit).to be_work_in_progress
end
end
- it "detects WIP for a commit just saying 'wip'" do
- commit.message = "wip"
-
- expect(commit).to be_work_in_progress
- end
-
it "does not detect WIP for a commit just saying 'draft'" do
commit.message = "draft"
expect(commit).not_to be_work_in_progress
end
- ["FIXUP!", "Draft - ", "Wipeout"].each do |draft_prefix|
+ ["FIXUP!", "Draft - ", "Wipeout", "WIP: ", "[WIP] ", "wip: "].each do |draft_prefix|
it "doesn't detect '#{draft_prefix}' at the start of the title as a draft" do
commit.message = "#{draft_prefix} #{commit.message}"