Added tests for default document type in `get` and `get_source` APIs

This commit is contained in:
Karel Minarik 2013-09-09 15:29:31 +02:00
parent e784cff1b0
commit cb4b04e49f
3 changed files with 37 additions and 1 deletions

View File

@ -0,0 +1,20 @@
---
"Default values":
- do:
index:
index: test_1
type: test
id: 1
body: { "foo": "bar" }
- do:
get:
index: test_1
id: 1
- match: { _index: test_1 }
- match: { _type: test }
- match: { _id: '1' }
- match: { _source: { foo: "bar" } }

View File

@ -16,7 +16,7 @@
- match: { _index: test_1 }
- match: { _type: test }
- match: { _id: "1" }
- match: { _id: '1' }
- match: { fields.foo: bar }
- is_false: _source

View File

@ -0,0 +1,16 @@
---
"Default values":
- do:
index:
index: test_1
type: test
id: 1
body: { "foo": "bar" }
- do:
get_source:
index: test_1
id: 1
- match: { '': { foo: bar } }