Skip to content

Commit

Permalink
check counters and latest_children
Browse files Browse the repository at this point in the history
  • Loading branch information
gazoon committed May 30, 2019
1 parent f6c4059 commit ea2f90f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/integration/cloud/reaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -540,16 +540,18 @@ describe('Nested reactions madness', () => {
});
});

describe("and then alice like her own like Bob's comment", () => {
ctx.requestShouldNotError(async () => {
ctx.response = await ctx.alice.reactions.addChild('like', likeReaction);
});
});

describe('and then alice reads the comment reaction', () => {
ctx.requestShouldNotError(async () => {
let reaction = await ctx.alice.reactions.get(comment.id);
reaction.children_counts.like.should.eql(1);
reaction.latest_children.should.have.all.keys('like');
reaction.latest_children.like.should.have.length(1);
ctx.shouldEqualBesideDuration(
reaction.latest_children.like[0],
likeReaction,
);
});
});

Expand Down

0 comments on commit ea2f90f

Please sign in to comment.