diff options
author | Alejandro Rodríguez <alejorro70@gmail.com> | 2017-12-26 15:53:31 -0300 |
---|---|---|
committer | Alejandro Rodríguez <alejorro70@gmail.com> | 2017-12-28 12:32:33 -0300 |
commit | 11247ac97c2e15d188878eb946cbc0817f705749 (patch) | |
tree | eecd51e54a2c1b8d92799d34b3854efe9489292c /spec/lib | |
parent | 46be07d2c1da93cffd59fb03036e357c04ff6f3b (diff) | |
download | gitlab-ce-11247ac97c2e15d188878eb946cbc0817f705749.tar.gz |
Move encoding methods to the more general EncodingHelpergitaly-encoding-helpers
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/encoding_helper_spec.rb | 14 | ||||
-rw-r--r-- | spec/lib/gitlab/gitaly_client_spec.rb | 14 |
2 files changed, 14 insertions, 14 deletions
diff --git a/spec/lib/gitlab/encoding_helper_spec.rb b/spec/lib/gitlab/encoding_helper_spec.rb index f6e5c55240f..87ec2698fc1 100644 --- a/spec/lib/gitlab/encoding_helper_spec.rb +++ b/spec/lib/gitlab/encoding_helper_spec.rb @@ -145,4 +145,18 @@ describe Gitlab::EncodingHelper do end end end + + describe 'encode_binary' do + [ + [nil, ""], + ["", ""], + [" ", " "], + %w(a1 a1), + ["编码", "\xE7\xBC\x96\xE7\xA0\x81".b] + ].each do |input, result| + it "encodes #{input.inspect} to #{result.inspect}" do + expect(ext_class.encode_binary(input)).to eq(result) + end + end + end end diff --git a/spec/lib/gitlab/gitaly_client_spec.rb b/spec/lib/gitlab/gitaly_client_spec.rb index a871ed0df0e..309b7338ef0 100644 --- a/spec/lib/gitlab/gitaly_client_spec.rb +++ b/spec/lib/gitlab/gitaly_client_spec.rb @@ -38,20 +38,6 @@ describe Gitlab::GitalyClient, skip_gitaly_mock: true do end end - describe 'encode' do - [ - [nil, ""], - ["", ""], - [" ", " "], - %w(a1 a1), - ["编码", "\xE7\xBC\x96\xE7\xA0\x81".b] - ].each do |input, result| - it "encodes #{input.inspect} to #{result.inspect}" do - expect(described_class.encode(input)).to eq result - end - end - end - describe 'allow_n_plus_1_calls' do context 'when RequestStore is enabled', :request_store do it 'returns the result of the allow_n_plus_1_calls block' do |