Added test for passing document `type` as part of the index argument

Closes #676