Sha256: 0b85e0bf6f5188588c877381e3bbb2e3ba80ac8fc6df286aad2dd88badc2fd52

Contents?: true

Size: 948 Bytes

Versions: 25

Compression:

Stored size: 948 Bytes

Contents

# -*- encoding: utf-8 -*-
require 'spec_helper'
describe Upsert do
  describe "supports multibyte" do
    it "works one-by-one" do
      assert_creates(Pet, [{:name => 'I♥NY', :gender => 'périferôl'}]) do
        upsert = Upsert.new $conn, :pets
        upsert.row({:name => 'I♥NY'}, {:gender => 'périferôl'})
      end
    end
    it "works serially" do
      assert_creates(Pet, [{:name => 'I♥NY', :gender => 'jÚrgen'}]) do
        upsert = Upsert.new $conn, :pets
        upsert.row({:name => 'I♥NY'}, {:gender => 'périferôl'})
        upsert.row({:name => 'I♥NY'}, {:gender => 'jÚrgen'})
      end
    end
    it "works batch" do
      assert_creates(Pet, [{:name => 'I♥NY', :gender => 'jÚrgen'}]) do
        Upsert.batch($conn, :pets) do |upsert|
          upsert.row({:name => 'I♥NY'}, {:gender => 'périferôl'})
          upsert.row({:name => 'I♥NY'}, {:gender => 'jÚrgen'})
        end
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
upsert-2.9.10-java spec/multibyte_spec.rb
upsert-2.9.10 spec/multibyte_spec.rb
upsert-2.9.9-universal-java-11 spec/multibyte_spec.rb
upsert-2.9.9 spec/multibyte_spec.rb
upsert-2.2.1 spec/multibyte_spec.rb
upsert-2.2.0 spec/multibyte_spec.rb
upsert-2.1.2 spec/multibyte_spec.rb
upsert-2.1.1 spec/multibyte_spec.rb
upsert-2.1.0 spec/multibyte_spec.rb
upsert-2.0.4 spec/multibyte_spec.rb
upsert-2.0.3 spec/multibyte_spec.rb
upsert-2.0.2 spec/multibyte_spec.rb
upsert-2.0.1 spec/multibyte_spec.rb
upsert-2.0.0 spec/multibyte_spec.rb
upsert-1.2.0 spec/multibyte_spec.rb
upsert-1.1.7 spec/multibyte_spec.rb
upsert-1.1.6 spec/multibyte_spec.rb
upsert-1.1.5 spec/multibyte_spec.rb
upsert-1.1.4 spec/multibyte_spec.rb
upsert-1.1.3 spec/multibyte_spec.rb