diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-03 18:17:34 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-03 18:17:34 +0000 |
commit | 0aa20f3dac8e19cc10b62e08a5c84df105a648c2 (patch) | |
tree | 3347e2aa05c399d70f82775fa58ffd4b531ba282 /spec/models/commit_spec.rb | |
parent | 67daaf4021a180166ad063e3a75ea777e96586a6 (diff) | |
download | gitlab-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.rb | 16 |
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}" |