summaryrefslogtreecommitdiff
path: root/rest-api-spec/test/create/15_without_id.yaml
blob: 0342fdb019b4fea5020e1a30f8d5912c725dca1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
---
"Create without ID":
 - do:
      create:
          index:  test_1
          type:   test
          body:   { foo: bar }

 - is_true:   _id
 - match:   { _index:   test_1 }
 - match:   { _type:    test   }
 - match:   { _version: 1      }
 - set:     { _id:      id    }

 - do:
      get:
          index:  test_1
          type:   test
          id:     '$id'

 - match:   { _index:   test_1 }
 - match:   { _type:    test   }
 - match:   { _id:      $id    }
 - match:   { _version: 1      }
 - match:   { _source: { foo: bar }}