Adding functional tests for new permissions endpoint