test polymorphic associations encoded attributes