Better test for unique contacts
This commit is contained in:
parent
4ba58d8132
commit
a7e30adc28
1 changed files with 4 additions and 1 deletions
|
|
@ -261,7 +261,10 @@ describe AspectsController do
|
|||
@aspect0.contacts.include?(@hash[:contacts].first[:contact]).should be_true
|
||||
end
|
||||
it 'does not retreive duplicate contacts' do
|
||||
@hash[:contacts].uniq.count.should == @hash[:contacts].count
|
||||
@hashes = @controller.send(:hashes_for_aspects, @user.aspects, @user.contacts)
|
||||
@hash = @hashes.first
|
||||
flattened = @hash[:contacts].map{|c| c[:person].id}
|
||||
flattened.uniq.should == flattened
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue