Commit bab351e9 authored by Kerri Miller's avatar Kerri Miller

Additional tests of #work_in_progress?

While investigating a possible issue with the regex, I added some
additional tests proving out some known "false" examples that users have
attempted to use in the past.

Changelog: other
parent 52133b3b
......@@ -1357,6 +1357,17 @@ RSpec.describe MergeRequest, factory_default: :keep do
end
end
[
"WIP ", "(WIP)",
"draft", "Draft"
].each do |draft_prefix|
it "doesn't detect '#{draft_prefix}' at the start of the title as a draft" do
subject.title = "#{draft_prefix}#{subject.title}"
expect(subject.work_in_progress?).to eq false
end
end
it "detects merge request title just saying 'wip'" do
subject.title = "wip"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment