Open flyingzumwalt opened 9 years ago
@jcoyne @elrayle
At least for testing purposes there is now a file_set_helper: https://github.com/projecthydra-labs/hydra-works/blob/master/spec/support/file_set_helper.rb
The use is demonstrated here: https://github.com/projecthydra-labs/hydra-works/blob/master/spec/hydra/works/services/characterization_service_spec.rb
Blocked by #146
I'm pretty sure this actually percolates down to the implementation of
directly_contains
in ActiveFedora.There are lots of places where the tests were using generic_file.add_file in the setup (which adds the file object to #attached_files in memory) and then never saving the parent. Now I have to save both the parent and the contained file.
If you search for
add_file
within this diff of sufia-core you'll see a lot of examples of where I had to save the GenericFile: https://github.com/projecthydra-labs/sufia-core/compare/before_cc...projecthydra-labs:migrate_to_curation_concernsHere's one example: https://github.com/projecthydra-labs/sufia-core/compare/before_cc...projecthydra-labs:migrate_to_curation_concerns#diff-32a50de6ae2d35fbe4b024d452d3a274R11