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
4906afca
Commit
4906afca
authored
8 years ago
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing specs for milestone model
parent
b24a6f60
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
app/models/milestone.rb
app/models/milestone.rb
+1
-1
spec/models/milestone_spec.rb
spec/models/milestone_spec.rb
+2
-0
No files found.
app/models/milestone.rb
View file @
4906afca
...
...
@@ -18,8 +18,8 @@ class Milestone < ActiveRecord::Base
cache_markdown_field
:description
belongs_to
:project
has_many
:issues
has_many
:boards
has_many
:issues
has_many
:labels
,
->
{
distinct
.
reorder
(
'labels.title'
)
},
through: :issues
has_many
:merge_requests
has_many
:participants
,
->
{
distinct
.
reorder
(
'users.name'
)
},
through: :issues
,
source: :assignee
...
...
This diff is collapsed.
Click to expand it.
spec/models/milestone_spec.rb
View file @
4906afca
...
...
@@ -21,6 +21,8 @@ describe Milestone, models: true do
describe
"Associations"
do
it
{
is_expected
.
to
belong_to
(
:project
)
}
it
{
is_expected
.
to
have_many
(
:boards
)
}
it
{
is_expected
.
to
have_many
(
:issues
)
}
end
...
...
This diff is collapsed.
Click to expand it.
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