Commit 1f265debb71102330237cf29ac21b95235b0e2ce
1 parent
aa91e714
Exists in
master
and in
21 other branches
Better fix for failing test
Showing
1 changed file
with
3 additions
and
2 deletions
Show diff stats
test/errors_test.rb
... | ... | @@ -2,8 +2,8 @@ require_relative "test_helper" |
2 | 2 | |
3 | 3 | class ErrorsTest < Minitest::Test |
4 | 4 | def test_bulk_import_raises_with_full_message |
5 | - valid_dog = Dog.new(name: "2016-01-02") | |
6 | - invalid_dog = Dog.new(name: "Ol' One-Leg") | |
5 | + valid_dog = Dog.new(id: 1, name: "2016-01-02") | |
6 | + invalid_dog = Dog.new(id: 2, name: "Ol' One-Leg") | |
7 | 7 | index = Searchkick::Index.new "dogs", mappings: { |
8 | 8 | dog: { |
9 | 9 | properties: { |
... | ... | @@ -15,5 +15,6 @@ class ErrorsTest < Minitest::Test |
15 | 15 | error = assert_raises(Searchkick::ImportError) do |
16 | 16 | index.bulk_index [valid_dog, invalid_dog] |
17 | 17 | end |
18 | + assert_match /on item with id '2'/, error.message | |
18 | 19 | end |
19 | 20 | end | ... | ... |