Put post.user assignment in controller and wrote tests