---
"Exists type":
 - do:
     indices.create:
       index: test_1
       body:
         mappings:
           type_1: {}
           type_2: {}

 - do:
     indices.exists_type:
       index: test_2
       type: type_1

 - is_false: ''

 - do:
     indices.exists_type:
       index: test_1
       type: type_3

 - is_false: ''

 - do:
     indices.exists_type:
       index: test_1
       type: type_1

 - is_true: ''
---
"Exists type with local flag":

 - do:
     indices.exists_type:
       index: test_1
       type: type_1
       local: true

 - is_false: ''
