We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 35aa57a commit 783cd1aCopy full SHA for 783cd1a
elasticsearch-persistence/test/integration/model/model_basic_test.rb
@@ -30,6 +30,23 @@ class ::Person
30
Person.gateway.create_index! force: true
31
end
32
33
+ should "save the object with custom ID" do
34
+ person = Person.new id: 1, name: 'Number One'
35
+ person.save
36
+
37
+ document = Person.find(1)
38
+ assert_not_nil document
39
+ assert_equal 'Number One', document.name
40
+ end
41
42
+ should "create the object with custom ID" do
43
+ person = Person.create id: 1, name: 'Number One'
44
45
46
47
48
49
50
should "save and find the object" do
51
person = Person.new name: 'John Smith', birthday: Date.parse('1970-01-01')
52
person.save
0 commit comments