fixes #4155 - enable association via api
Use factories for tests to avoid breaking fixtures, remove some whitespace