mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
test 404 response when PUTting to a non-existent document
This commit is contained in:
parent
53d35573ee
commit
32768725df
1 changed files with 12 additions and 0 deletions
|
@ -83,6 +83,18 @@ define(function (require) {
|
|||
]);
|
||||
});
|
||||
|
||||
bdd.it('should return 404 for a non-existent id', function () {
|
||||
var pattern = createTestData().indexPatternWithMappings;
|
||||
pattern.fields = _.map(pattern.fields, function (field) {
|
||||
return _.omit(field, 'mapping');
|
||||
});
|
||||
pattern.title = 'idonotexist';
|
||||
|
||||
return request.put('/index-patterns/idonotexist')
|
||||
.send(pattern)
|
||||
.expect(404);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue