2019-10-12 21:52:04 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
FactoryBot.define do
|
2015-11-26 14:37:03 +05:30
|
|
|
factory :lfs_object do
|
2017-08-17 22:00:37 +05:30
|
|
|
sequence(:oid) { |n| "b68143e6463773b1b6c6fd009a76c32aeec041faff32ba2ed42fd7f708a%05x" % n }
|
2019-12-21 20:55:43 +05:30
|
|
|
size { 499013 }
|
2015-11-26 14:37:03 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
trait :with_file do
|
2018-11-08 19:23:39 +05:30
|
|
|
file { fixture_file_upload("spec/fixtures/dk.png", "`/png") }
|
2015-11-26 14:37:03 +05:30
|
|
|
end
|
2018-03-27 19:54:05 +05:30
|
|
|
|
|
|
|
# The uniqueness constraint means we can't use the correct OID for all LFS
|
|
|
|
# objects, so the test needs to decide which (if any) object gets it
|
|
|
|
trait :correct_oid do
|
2019-12-21 20:55:43 +05:30
|
|
|
oid { 'b804383982bb89b00e828e3f44c038cc991d3d1768009fc39ba8e2c081b9fb75' }
|
|
|
|
size { 1062 }
|
2018-03-27 19:54:05 +05:30
|
|
|
end
|
2018-05-09 12:01:36 +05:30
|
|
|
|
|
|
|
trait :object_storage do
|
|
|
|
file_store { LfsObjectUploader::Store::REMOTE }
|
|
|
|
end
|
2015-11-26 14:37:03 +05:30
|
|
|
end
|