refactoring the tests to reuse the permissions obj
cleaning up docs
fixing the test