refactor tests and add tests for MembersController#edit