Sha256: 213246ba528f131fcb9ca119b52a69c70db8431792a1f2fc390d75ad065f161f

Contents?: true

Size: 489 Bytes

Versions: 19

Compression:

Stored size: 489 Bytes

Contents

require_relative "test_helper"

class ErrorsTest < Minitest::Test
  def test_bulk_import_raises_error
    valid_dog = Product.create(name: "2016-01-02")
    invalid_dog = Product.create(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

19 entries across 19 versions & 3 rubygems

Version Path
searchkick-3.1.0 test/errors_test.rb
searchkick-3.0.3 test/errors_test.rb
searchkick_evichat-0.0.2 test/errors_test.rb
searchkick-3.0.2 test/errors_test.rb
searchkick-3.0.1 test/errors_test.rb
searchkick-3.0.0 test/errors_test.rb
searchkick-2.5.0 test/errors_test.rb
searchkick-hooopo-2.4.1 test/errors_test.rb
searchkick-hooopo-2.4.0 test/errors_test.rb
searchkick-2.4.0 test/errors_test.rb
searchkick-hooopo-2.3.5 test/errors_test.rb
searchkick-2.3.2 test/errors_test.rb
searchkick-hooopo-2.3.4 test/errors_test.rb
searchkick-2.3.1 test/errors_test.rb
searchkick-hooopo-2.3.3 test/errors_test.rb
searchkick-hooopo-2.3.2 test/errors_test.rb
searchkick-hooopo-2.3.1 test/errors_test.rb
searchkick-hooopo-2.3.0 test/errors_test.rb
searchkick-2.3.0 test/errors_test.rb