tests for invitation functionality