decidim-comments/app/frontend/comments/comment_thread.component.test.tsx in decidim-0.2.0 vs decidim-comments/app/frontend/comments/comment_thread.component.test.tsx in decidim-0.3.0

- old
+ new

@@ -37,9 +37,20 @@ it("should render a h6 comment-thread__title with author name", () => { const wrapper = shallow(<CommentThread comment={comment} session={session} />); expect(wrapper.find("h6.comment-thread__title").text()).toContain(`Conversation with ${comment.author.name}`); }); + + describe("when the author's account has been deleted", () => { + beforeEach(() => { + comment.author.deleted = true; + }); + + it("should render a h6 comment-thread__title with 'Deleted user'", () => { + const wrapper = shallow(<CommentThread comment={comment} session={session} />); + expect(wrapper.find("h6.comment-thread__title").text()).toContain("Conversation with Deleted user"); + }); + }); }); describe("should render a Comment", () => { it("and pass the session as a prop to it", () => { const wrapper = shallow(<CommentThread comment={comment} session={session} />);