duplicate document issue - fixed

changing "=" to equal.
adding test