debian-mirror-gitlab/spec/factories/gitaly/commit.rb

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

21 lines
572 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2018-03-17 18:26:18 +05:30
FactoryBot.define do
sequence(:gitaly_commit_id) { Digest::SHA1.hexdigest(Time.now.to_f.to_s) }
2020-03-13 15:44:24 +05:30
factory :gitaly_commit, class: 'Gitaly::GitCommit' do
2018-03-17 18:26:18 +05:30
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-12-21 20:55:43 +05:30
2018-03-17 18:26:18 +05:30
body { subject + "\nMy body" }
2021-04-29 21:17:54 +05:30
author { association(:gitaly_commit_author) }
committer { association(:gitaly_commit_author) }
2018-03-17 18:26:18 +05:30
end
end