2.0 KiB
2.0 KiB
id | title | challengeType |
---|---|---|
587d7fb8367417b2b2512c0e | Perform Classic Updates by Running Find, Edit, then Save | 2 |
Description
Instructions
Tests
tests:
- text: Find-edit-update an item should succeed
testString: "getUserInput => $.post(getUserInput('url') + '/_api/find-edit-save', {name:'Poldo', age: 40, favoriteFoods:['spaghetti']}).then(data => { assert.equal(data.name, 'Poldo', 'item.name is not what is expected'); assert.equal(data.age, 40, 'item.age is not what expected'); assert.deepEqual(data.favoriteFoods, ['spaghetti', 'hamburger'], 'item.favoriteFoods is not what expected'); assert.equal(data.__v, 1, 'The item should be previously edited'); }, xhr => { throw new Error(xhr.responseText); })"
Challenge Seed
Solution
// solution required