Add missing specs for milestone model

parent b24a6f60
......@@ -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
......
......@@ -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
......
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