File: truncated_utf8_spec.rb

package info (click to toggle)
ruby-mongo 2.21.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 14,764 kB
  • sloc: ruby: 108,806; makefile: 5; sh: 2
file content (26 lines) | stat: -rw-r--r-- 526 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# frozen_string_literal: true
# rubocop:todo all

require 'spec_helper'

describe 'truncated UTF-8 in server error messages' do
  let(:rep) do
    '(╯°□°)╯︵ ┻━┻'
  end

  let(:collection) do
    authorized_client['truncated_utf8']
  end

  before(:all) do
    ClientRegistry.instance.global_client('authorized')['truncated_utf8'].indexes.create_one(
      {k: 1}, unique: true)
  end

  it 'works' do
    pending 'RUBY-2560'

    collection.insert_one(k: rep*20)
    collection.insert_one(k: rep*20)
  end
end