Add tests to check createindexes management command