Sha256: af78ce85caa88fd2d1febb6f0e79993a095e0f25b01ad390d722692018c53760
Contents?: true
Size: 971 Bytes
Versions: 21
Compression:
Stored size: 971 Bytes
Contents
FactoryGirl.define do factory :raster_file, class: FileSet do initialize_with { new(geo_mime_type: 'image/tiff; gdal-format=GTiff') } transient do user { FactoryGirl.create(:user) } content nil cartographic_projection 'urn:ogc:def:crs:EPSG::6326' end after(:build) do |file, evaluator| file.apply_depositor_metadata(evaluator.user.user_key) end after(:create) do |file, evaluator| if evaluator.content Hydra::Works::UploadFileToFileSet.call(file, evaluator.content) end end factory :raster_file_with_raster do # after(:build) do |file, evaluator| # file.title = ['testfile'] # end after(:create) do |file, evaluator| if evaluator.content Hydra::Works::UploadFileToFileSet.call(file, evaluator.content) end raster = FactoryGirl.create(:raster, user: evaluator.user) raster.raster_files << file end end end end
Version data entries
21 entries across 21 versions & 2 rubygems