diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-21 12:06:16 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-21 12:06:16 +0300 |
commit | a048261403ea7e12992ccffe704f0779235712d7 (patch) | |
tree | 59254549db6d39a4da824379a7bf354e7c8e7e67 /spec/lib/gitlab/git/commit_spec.rb | |
parent | 80e5134020483299c039114e76b734436f006c66 (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.rb | 8 |
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) } |