Replace deprecated method pid with id

Nope, passing the object itself in tests is fine as long as it responds to to_param.