debian-mirror-gitlab/spec/factories/packages/composer/cache_files.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
502 B
Ruby
Raw Normal View History

2021-11-18 22:05:49 +05:30
# frozen_string_literal: true
FactoryBot.define do
factory :composer_cache_file, class: 'Packages::Composer::CacheFile' do
group
file_sha256 { '1' * 64 }
transient do
file_fixture { 'spec/fixtures/packages/composer/package.json' }
end
after(:build) do |cache_file, evaluator|
cache_file.file = fixture_file_upload(evaluator.file_fixture)
end
trait(:object_storage) do
file_store { Packages::Composer::CacheUploader::Store::REMOTE }
end
end
end