Fix and test leave project display
The 'Leave this project' display on project page was broken. It was calling the method incorrectly, which returned nil
and displayed nothing.
This fixes the display and also adds 2 different tests for it.
cc/ @jvanbaarsen @stanhu Please review and merge if you think it looks good. Thank you!