def replicate(other_db, continuous, options)
# Here you are copying the options, so you have payload[:doc_ids]
payload = options
# And if options[:doc_ids] is nil, payload still has the :doc_ids set to nil... it should be removed...
payload['doc_ids'] = options[:doc_ids] if options[:doc_ids]
So I changed that line to:
payload.delete :doc_ids unless options[:doc_ids]
(well, you can see it in the diff, but the explanation is worth it :-P)
Sorry, I don't know how to spec it (or why your current spec passes)
Fix database replicate: doc_ids is sent empty when not specified
Hi. I'm afraid your fix does not really get to the root of the problem. There is a whole lot of crappy code around replication that I haven't had chance to refactor yet. I'll try and fix this soon.
Strongly request the pull before refactor. I got hit by this bug and wasted many hours.