Can we add a test that uses `index_name` too? Sorry if it's already here and I missed it.
Also, not sure but maybe it's worth to split all those asserts and cases into different test methods?