refactored tests for user access to index