Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
370fd105
Commit
370fd105
authored
Apr 07, 2017
by
Jacopo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed `Milestone#is_empty?`
Removed `Milestone#is_empty?` because is not used anymore in the codebase
parent
46e4ed6b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
16 deletions
+4
-16
app/models/milestone.rb
app/models/milestone.rb
+0
-4
changelogs/unreleased/30056-rename-milestones-empty.yml
changelogs/unreleased/30056-rename-milestones-empty.yml
+4
-0
spec/models/milestone_spec.rb
spec/models/milestone_spec.rb
+0
-12
No files found.
app/models/milestone.rb
View file @
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
...
...
changelogs/unreleased/30056-rename-milestones-empty.yml
0 → 100644
View file @
370fd105
---
title
:
Removed Milestone#is_empty?
merge_request
:
10523
author
:
Jacopo Beschi @jacopo-beschi
spec/models/milestone_spec.rb
View file @
370fd105
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment