add_virtual_resource was failing because the parent contentMetadata had no resources; this allows it to start with 0 resources (e.g. when the --purge flag is set for virtual-merge script in dor-utils)
This is on the master branch so the fix will be carried forward into releases beyond 7.x.
Coverage remained the same at 91.204% when pulling 1ce7c93758e1d136b468af1415fb917280a8e288 on fix-add-virtual-resource into 3b3923f42ac8f94e4f8e486d70bac5a163cd88fa on master.
Connects to #651
add_virtual_resource was failing because the parent contentMetadata had no resources; this allows it to start with 0 resources (e.g. when the --purge flag is set for virtual-merge script in dor-utils)
This is on the master branch so the fix will be carried forward into releases beyond 7.x.