1.5 KiB
1.5 KiB
id | title | challengeType |
---|---|---|
587d7fb8367417b2b2512c11 | Delete Many Documents with model.remove() | 2 |
Description
Instructions
Tests
tests:
- text: Deleting many items at once should succeed
testString: 'getUserInput => $.ajax({url: getUserInput(''url'') + ''/_api/remove-many-people'', type: ''POST'', contentType:''application/json'', data: JSON.stringify([{name: ''Mary'', age: 16, favoriteFoods: [''lollipop'']}, {name: ''Mary'', age: 21, favoriteFoods: [''steak'']}])}).then(data => { assert.isTrue(!!data.ok, ''The mongo stats are not what expected''); assert.equal(data.n, 2, ''The number of items affected is not what expected''); assert.equal(data.count, 0, ''the db items count is not what expected''); }, xhr => { throw new Error(xhr.responseText); })'
Challenge Seed
Solution
// solution required