You realize that this test will allow documents with no parent_id property, since nil is not equal to an empty string?
parent_id
nil