Commit 3db7926b authored by Kerri Miller's avatar Kerri Miller

Alias #work_in_progress? <-> #draft?

parent 25d5116c
...@@ -1039,6 +1039,7 @@ class MergeRequest < ApplicationRecord ...@@ -1039,6 +1039,7 @@ class MergeRequest < ApplicationRecord
def work_in_progress? def work_in_progress?
self.class.work_in_progress?(title) self.class.work_in_progress?(title)
end end
alias_method :draft?, :work_in_progress?
def wipless_title def wipless_title
self.class.wipless_title(self.title) self.class.wipless_title(self.title)
......
...@@ -1366,6 +1366,10 @@ RSpec.describe MergeRequest, factory_default: :keep do ...@@ -1366,6 +1366,10 @@ RSpec.describe MergeRequest, factory_default: :keep do
it "doesn't detect WIP by default" do it "doesn't detect WIP by default" do
expect(subject.work_in_progress?).to eq false expect(subject.work_in_progress?).to eq false
end end
it "is aliased to #draft?" do
expect(subject.method(:work_in_progress?)).to eq(subject.method(:draft?))
end
end end
describe "#wipless_title" do 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