This commit is contained in:
syuilo 2017-01-17 14:12:33 +09:00
parent 378728e534
commit 85a15fdc62

View file

@ -105,29 +105,22 @@ describe('API', () => {
}); });
}); });
describe('i/update', () => { it('i/update', done => {
it('update my name', done => { const myName = '大室櫻子';
const myName = '大室櫻子'; const myLocation = '七森中';
request('/i/update', { const myBirthday = '2000-09-07';
name: myName
}, me).then(res => {
res.should.have.status(200);
res.body.should.be.a('object');
res.body.should.have.property('name').eql(myName);
done();
});
});
it('update my location', done => { request('/i/update', {
const myLocation = '七森中'; name: myName,
request('/i/update', { location: myLocation,
location: myLocation birthday: myBirthday
}, me).then(res => { }, me).then(res => {
res.should.have.status(200); res.should.have.status(200);
res.body.should.be.a('object'); res.body.should.be.a('object');
res.body.should.have.property('location').eql(myLocation); res.body.should.have.property('name').eql(myName);
done(); res.body.should.have.property('location').eql(myLocation);
}); res.body.should.have.property('birthday').eql(myBirthday);
done();
}); });
}); });