Add tests for permissions