Restore and update polyamorous join association equality spec, originally
6e2e1cc5d0 (diff-68f369577aaf68dd541acf26e438e413R20-R37)
This commit is contained in:
parent
d054f114fd
commit
ca51ed8a17
|
@ -10,6 +10,13 @@ module Polyamorous
|
|||
new_join_association(reflection, parent.children, Article)
|
||||
}
|
||||
|
||||
subject { new_join_association(reflection, parent.children, Person) }
|
||||
|
||||
it 'respects polymorphism on equality test' do
|
||||
expect(subject).to eq new_join_association(reflection, parent.children, Person)
|
||||
expect(subject).not_to eq new_join_association(reflection, parent.children, Article)
|
||||
end
|
||||
|
||||
it 'leaves the orginal reflection intact for thread safety' do
|
||||
reflection.instance_variable_set(:@klass, Article)
|
||||
join_association
|
||||
|
|
Loading…
Reference in New Issue