File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
elasticsearch-persistence/test/integration/model Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,23 @@ class ::Person
30
30
Person . gateway . create_index! force : true
31
31
end
32
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
+ document = Person . find ( 1 )
46
+ assert_not_nil document
47
+ assert_equal 'Number One' , document . name
48
+ end
49
+
33
50
should "save and find the object" do
34
51
person = Person . new name : 'John Smith' , birthday : Date . parse ( '1970-01-01' )
35
52
person . save
You can’t perform that action at this time.
0 commit comments