2019-07-25 05:11:48 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-12-14 00:13:44 +00:00
|
|
|
FactoryBot.define do
|
2017-09-20 22:28:57 +00:00
|
|
|
sequence(:gitaly_commit_id) { Digest::SHA1.hexdigest(Time.now.to_f.to_s) }
|
|
|
|
|
2020-01-09 18:07:52 +00:00
|
|
|
factory :gitaly_commit, class: 'Gitaly::GitCommit' do
|
2017-09-20 22:28:57 +00:00
|
|
|
skip_create
|
|
|
|
|
|
|
|
id { generate(:gitaly_commit_id) }
|
|
|
|
parent_ids do
|
|
|
|
ids = [generate(:gitaly_commit_id), generate(:gitaly_commit_id)]
|
|
|
|
Google::Protobuf::RepeatedField.new(:string, ids)
|
|
|
|
end
|
|
|
|
subject { "My commit" }
|
2019-10-18 11:11:44 +00:00
|
|
|
|
2017-09-20 22:28:57 +00:00
|
|
|
body { subject + "\nMy body" }
|
2021-03-16 15:11:17 +00:00
|
|
|
author { association(:gitaly_commit_author) }
|
|
|
|
committer { association(:gitaly_commit_author) }
|
2017-09-20 22:28:57 +00:00
|
|
|
end
|
|
|
|
end
|