summaryrefslogtreecommitdiff
path: root/rest-api-spec/src/main/resources/rest-api-spec/test/exists/30_parent.yml
blob: 4c92605756a3732020d11b724450fb0f809f0e43 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
setup:
 - do:
      indices.create:
          index: test_1
          body:
            mappings:
              test:
                _parent: { type: "foo" }

---
"Parent":
 - do:
      index:
          index:   test_1
          type:    test
          id:      1
          parent:  5
          body:    { foo: bar }

 - do:
      exists:
          index:   test_1
          type:    test
          id:      1
          parent:  5

 - is_true: ''

---
"Parent omitted":

 - do:
      catch: bad_request
      exists:
          index:   test_1
          type:    test
          id:      1