mirror of
https://github.com/wassname/talk.git
synced 2026-08-12 12:30:39 +08:00
Merge branch 'master' into asset-graph-api
This commit is contained in:
@@ -51,12 +51,12 @@ describe('graph.Context', () => {
|
||||
id: '1',
|
||||
name: 'Tag',
|
||||
})
|
||||
.then(() => {
|
||||
throw new Error('should not reach this point');
|
||||
})
|
||||
.catch((err) => {
|
||||
expect(err).to.be.equal(errors.ErrNotAuthorized);
|
||||
});
|
||||
.then(() => {
|
||||
throw new Error('should not reach this point');
|
||||
})
|
||||
.catch((err) => {
|
||||
expect(err).to.be.equal(errors.ErrNotAuthorized);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -181,24 +181,24 @@ describe('graph.mutations.createComment', () => {
|
||||
body
|
||||
}
|
||||
})
|
||||
.then(({data, errors}) => {
|
||||
expect(errors).to.be.undefined;
|
||||
expect(data.createComment).to.have.property('comment').not.null;
|
||||
expect(data.createComment.comment).to.have.property('status', status);
|
||||
expect(data.createComment).to.have.property('errors').null;
|
||||
.then(({data, errors}) => {
|
||||
expect(errors).to.be.undefined;
|
||||
expect(data.createComment).to.have.property('comment').not.null;
|
||||
expect(data.createComment.comment).to.have.property('status', status);
|
||||
expect(data.createComment).to.have.property('errors').null;
|
||||
|
||||
return ActionModel.find({
|
||||
item_id: data.createComment.comment.id,
|
||||
action_type: 'FLAG'
|
||||
return ActionModel.find({
|
||||
item_id: data.createComment.comment.id,
|
||||
action_type: 'FLAG'
|
||||
});
|
||||
})
|
||||
.then((actions) => {
|
||||
if (flagged) {
|
||||
expect(actions).to.have.length(1);
|
||||
} else {
|
||||
expect(actions).to.have.length(0);
|
||||
}
|
||||
});
|
||||
})
|
||||
.then((actions) => {
|
||||
if (flagged) {
|
||||
expect(actions).to.have.length(1);
|
||||
} else {
|
||||
expect(actions).to.have.length(0);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user