Commit cf5890e0 authored by Dylan Griffith's avatar Dylan Griffith

Merge branch 'kerrizor/add-draft-alias-for-work_in_progress-check' into 'master'

Alias #work_in_progress? <-> #draft?

See merge request gitlab-org/gitlab!54873
parents 046a35cc 3db7926b
......@@ -1039,6 +1039,7 @@ class MergeRequest < ApplicationRecord
def work_in_progress?
self.class.work_in_progress?(title)
end
alias_method :draft?, :work_in_progress?
def wipless_title
self.class.wipless_title(self.title)
......
......@@ -1366,6 +1366,10 @@ RSpec.describe MergeRequest, factory_default: :keep do
it "doesn't detect WIP by default" do
expect(subject.work_in_progress?).to eq false
end
it "is aliased to #draft?" do
expect(subject.method(:work_in_progress?)).to eq(subject.method(:draft?))
end
end
describe "#wipless_title" do
......
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