HI FCC community
I have issue with this challenge.
I know this is simple one where we are just changing values from the previous challenge but for some reason I keep getting an error
// running tests
All tests should pass
You should test for 'res.status' to be 200
You should test for 'res.type' to be 'application/json'
You should test for 'res.body.name' to be 'Giovanni'
You should test for 'res.body.surname' to be 'da Verrazzano'
// tests completed
…yet, I know I have typed in everything exactly the same way as previous challenge.
Here is my code.
/** Repetition is the mother of learning. **/
// Try it again. This time without help !!
test('send {surname: "da Verrazzano"}', function(done) {
// we setup the request for you...
chai
.request(server)
.put('/travellers')
/** send {surname: 'da Verrazzano'} here **/
.send({ surname: 'da Verrazzano' })
// .send({...})
.end(function(err, res) {
/** your tests here **/
assert.equal(res.status, 200, 'response status should be 200');
assert.equal(res.type, 'application/json', 'Response should be json');
assert.equal(
res.body.name,
'Giovanni',
'res.body.name should be "Giovanni"'
);
assert.equal(
res.body.surname,
'da Verrazzano',
'res.body.surname should be "da Verrazzano"'
);
done(); // Never forget the 'done()' callback...
});
});
Please, help