diff options
author | James Lopez <james@jameslopez.es> | 2017-04-20 16:10:33 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-04-20 16:10:33 +0200 |
commit | 71b6a4ba85150c88414f50ac4965cab71021202d (patch) | |
tree | e61ebdd29a240e21c95724fafe4c96f39ee3d241 /spec | |
parent | b99853f509cca1c6ae1892513658add575230692 (diff) | |
download | gitlab-ce-71b6a4ba85150c88414f50ac4965cab71021202d.tar.gz |
Return empty string on UTF8 conversion with U_STRING_NOT_TERMINATED_WARNING errorfix/encoding-issue
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/git/encoding_helper_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/lib/gitlab/git/encoding_helper_spec.rb b/spec/lib/gitlab/git/encoding_helper_spec.rb index 27bcc241b82..f6ac7b23d1d 100644 --- a/spec/lib/gitlab/git/encoding_helper_spec.rb +++ b/spec/lib/gitlab/git/encoding_helper_spec.rb @@ -56,6 +56,10 @@ describe Gitlab::Git::EncodingHelper do expect(r.encoding.name).to eq('UTF-8') end end + + it 'returns empty string on conversion errors' do + expect { ext_class.encode_utf8('') }.not_to raise_error(ArgumentError) + end end describe '#clean' do |