added test for scoped relations