Commit 7ccaa27f authored by Robert Speicher's avatar Robert Speicher

Merge branch '30056-rename-milestones-empty' into 'master'

Removed `Milestone#is_empty?`

Closes #30056

See merge request !10523
parents d88a238b 370fd105
......@@ -153,10 +153,6 @@ class Milestone < ActiveRecord::Base
active? && issues.opened.count.zero?
end
def is_empty?(user = nil)
total_items_count(user).zero?
end
def author_id
nil
end
......
---
title: Removed Milestone#is_empty?
merge_request: 10523
author: Jacopo Beschi @jacopo-beschi
......@@ -109,18 +109,6 @@ describe Milestone, models: true do
it { expect(milestone.percent_complete(user)).to eq(75) }
end
describe '#is_empty?' do
before do
milestone.issues << create(:issue, project: project)
milestone.issues << create(:closed_issue, project: project)
milestone.merge_requests << create(:merge_request)
end
it { expect(milestone.closed_items_count(user)).to eq(1) }
it { expect(milestone.total_items_count(user)).to eq(3) }
it { expect(milestone.is_empty?(user)).to be_falsey }
end
describe '#can_be_closed?' do
it { expect(milestone.can_be_closed?).to be_truthy }
end
......
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