2019-07-25 05:11:48 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-12-14 00:13:44 +00:00
|
|
|
FactoryBot.define do
|
2015-10-12 14:42:14 +00:00
|
|
|
factory :lfs_object do
|
2016-11-22 16:58:10 +00:00
|
|
|
sequence(:oid) { |n| "b68143e6463773b1b6c6fd009a76c32aeec041faff32ba2ed42fd7f708a%05x" % n }
|
2019-10-02 00:06:26 +00:00
|
|
|
size { 499013 }
|
2015-10-12 14:42:14 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
trait :with_file do
|
2018-06-05 21:18:06 +00:00
|
|
|
file { fixture_file_upload("spec/fixtures/dk.png", "`/png") }
|
2015-10-12 14:42:14 +00:00
|
|
|
end
|
2018-03-05 11:16:17 +00:00
|
|
|
|
|
|
|
# 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-10-02 00:06:26 +00:00
|
|
|
oid { 'b804383982bb89b00e828e3f44c038cc991d3d1768009fc39ba8e2c081b9fb75' }
|
|
|
|
size { 1062 }
|
2018-03-05 11:16:17 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
trait :object_storage do
|
|
|
|
file_store { LfsObjectUploader::Store::REMOTE }
|
|
|
|
end
|
2015-10-12 14:42:14 +00:00
|
|
|
end
|