permissions unit tests