Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-21 12:06:16 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-21 12:06:16 +0300
commita048261403ea7e12992ccffe704f0779235712d7 (patch)
tree59254549db6d39a4da824379a7bf354e7c8e7e67 /spec/lib/gitlab/git/commit_spec.rb
parent80e5134020483299c039114e76b734436f006c66 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/git/commit_spec.rb')
-rw-r--r--spec/lib/gitlab/git/commit_spec.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/lib/gitlab/git/commit_spec.rb b/spec/lib/gitlab/git/commit_spec.rb
index cdab7127748..6c9467916de 100644
--- a/spec/lib/gitlab/git/commit_spec.rb
+++ b/spec/lib/gitlab/git/commit_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "spec_helper"
describe Gitlab::Git::Commit, :seed_helper do
@@ -64,8 +66,8 @@ describe Gitlab::Git::Commit, :seed_helper do
end
describe "Commit info from gitaly commit" do
- let(:subject) { "My commit".force_encoding('ASCII-8BIT') }
- let(:body) { subject + "My body".force_encoding('ASCII-8BIT') }
+ let(:subject) { (+"My commit").force_encoding('ASCII-8BIT') }
+ let(:body) { subject + (+"My body").force_encoding('ASCII-8BIT') }
let(:body_size) { body.length }
let(:gitaly_commit) { build(:gitaly_commit, subject: subject, body: body, body_size: body_size) }
let(:id) { gitaly_commit.id }
@@ -85,7 +87,7 @@ describe Gitlab::Git::Commit, :seed_helper do
it { expect(commit.parent_ids).to eq(gitaly_commit.parent_ids) }
context 'body_size != body.size' do
- let(:body) { "".force_encoding('ASCII-8BIT') }
+ let(:body) { (+"").force_encoding('ASCII-8BIT') }
context 'zero body_size' do
it { expect(commit.safe_message).to eq(subject) }