Sha256: 030c6030480f99702eb407c005ead13382b578736c46b991c53dfe799523f0f8

Contents?: true

Size: 475 Bytes

Versions: 14

Compression:

Stored size: 475 Bytes

Contents

require_relative "test_helper"

class ErrorsTest < Minitest::Test
  def test_bulk_import_raises_error
    valid_dog = Dog.new(name: "2016-01-02")
    invalid_dog = Dog.new(name: "Ol' One-Leg")
    index = Searchkick::Index.new "dogs", mappings: {
      dog: {
        properties: {
          name: {type: "date"}
        }
      }
    }
    index.store valid_dog
    assert_raises(Searchkick::ImportError) do
      index.bulk_index [valid_dog, invalid_dog]
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
searchkick-2.1.1 test/errors_test.rb
searchkick-2.1.0 test/errors_test.rb
searchkick-2.0.4 test/errors_test.rb
searchkick-2.0.3 test/errors_test.rb
searchkick-2.0.2 test/errors_test.rb
searchkick-2.0.1 test/errors_test.rb
searchkick-2.0.0 test/errors_test.rb
searchkick-1.5.1 test/errors_test.rb
searchkick-1.5.0 test/errors_test.rb
searchkick-1.4.2 test/errors_test.rb
searchkick-1.4.1 test/errors_test.rb
searchkick-1.4.0 test/errors_test.rb
searchkick-1.3.6 test/errors_test.rb
searchkick-1.3.5 test/errors_test.rb