mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 01:53:08 +02:00
test
This commit is contained in:
parent
378728e534
commit
85a15fdc62
1 changed files with 15 additions and 22 deletions
23
test/api.js
23
test/api.js
|
@ -105,31 +105,24 @@ describe('API', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('i/update', () => {
|
||||
it('update my name', done => {
|
||||
it('i/update', done => {
|
||||
const myName = '大室櫻子';
|
||||
const myLocation = '七森中';
|
||||
const myBirthday = '2000-09-07';
|
||||
|
||||
request('/i/update', {
|
||||
name: myName
|
||||
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);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
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);
|
||||
res.body.should.have.property('birthday').eql(myBirthday);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('posts/create', () => {
|
||||
it('simple', done => {
|
||||
|
|
Loading…
Reference in a new issue