diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-05-29 13:57:23 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-05-29 13:57:23 +0300 |
commit | f0a78f89cdc9218ac956e480baae8402a515a7cf (patch) | |
tree | a07927a51aceda2aa70a89c709cb2fe621f7350a /spec | |
parent | 41a2b9da525ff0163340dc2822fb0953b369720c (diff) | |
parent | c3bca2ac743bfb76415ba8cf5d23cbd0c4245b9f (diff) |
Merge branch 'fix_duplicated_assignees_on_milestone_page' into 'master'
Fix: Milestone - Participants list is showing duplicate assignees
Closes #32690
See merge request !11758
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/milestone_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/models/milestone_spec.rb b/spec/models/milestone_spec.rb index e3e8e6d571c..aa1ce89ffd7 100644 --- a/spec/models/milestone_spec.rb +++ b/spec/models/milestone_spec.rb @@ -249,4 +249,17 @@ describe Milestone, models: true do expect(milestone.to_reference(another_project)).to eq "sample-project%1" end end + + describe '#participants' do + let(:project) { build(:empty_project, name: 'sample-project') } + let(:milestone) { build(:milestone, iid: 1, project: project) } + + it 'returns participants without duplicates' do + user = create :user + create :issue, project: project, milestone: milestone, assignees: [user] + create :issue, project: project, milestone: milestone, assignees: [user] + + expect(milestone.participants).to eq [user] + end + end end |