From 85a15fdc62b7190223a14ecb1ff8048ff43d53f5 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 17 Jan 2017 14:12:33 +0900 Subject: [PATCH] test --- test/api.js | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/test/api.js b/test/api.js index ab2bc5bdd..fbda83ec8 100644 --- a/test/api.js +++ b/test/api.js @@ -105,29 +105,22 @@ describe('API', () => { }); }); - describe('i/update', () => { - it('update my name', done => { - const myName = '大室櫻子'; - request('/i/update', { - 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('i/update', done => { + const myName = '大室櫻子'; + const myLocation = '七森中'; + const myBirthday = '2000-09-07'; - it('update my location', done => { - const myLocation = '七森中'; - request('/i/update', { - location: myLocation - }, me).then(res => { - res.should.have.status(200); - res.body.should.be.a('object'); - res.body.should.have.property('location').eql(myLocation); - done(); - }); + request('/i/update', { + name: myName, + location: myLocation, + birthday: myBirthday + }, me).then(res => { + res.should.have.status(200); + res.body.should.be.a('object'); + res.body.should.have.property('name').eql(myName); + res.body.should.have.property('location').eql(myLocation); + res.body.should.have.property('birthday').eql(myBirthday); + done(); }); });