Refactor index admin test

Make things a tad cleaner and fix 404 check.