summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-08-08 20:35:38 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-08-08 20:35:38 +0800
commit75096f958c7604be40ec7b766ce42e27978c466a (patch)
tree722d163241b6fec5db7cf88892223d0bcadf31d8
parentd831e8e1d06c11e9dc9c0c36767b005a3b86a308 (diff)
downloadgitlab-ce-75096f958c7604be40ec7b766ce42e27978c466a.tar.gz
Make sure that we have author and committer
In case we don't have it setup in ~/.gitconfig
-rw-r--r--spec/lib/gitlab/encoding_helper_spec.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/spec/lib/gitlab/encoding_helper_spec.rb b/spec/lib/gitlab/encoding_helper_spec.rb
index 26138598651..8b14b227e65 100644
--- a/spec/lib/gitlab/encoding_helper_spec.rb
+++ b/spec/lib/gitlab/encoding_helper_spec.rb
@@ -64,10 +64,13 @@ describe Gitlab::EncodingHelper do
index.read_tree(repo.head.target.tree) unless repo.empty?
index.add(path: path, oid: oid, mode: 0100644)
+ user = { name: 'Test', email: 'test@example.com' }
Rugged::Commit.create(
repo,
tree: index.write_tree(repo),
+ author: user,
+ committer: user,
message: "Update #{path}",
parents: repo.empty? ? [] : [repo.head.target].compact,
update_ref: 'HEAD'