// createWorkItemComment creates a workitem comment that will be used to perform the comment operations during the tests. func (s *CommentsSuite) createWorkItemComment(identity account.Identity, workitemId string, body string, markup *string) uuid.UUID { createWorkItemCommentPayload := s.newCreateWorkItemCommentsPayload(body, markup) userSvc, _, workitemCommentsCtrl, _ := s.securedControllers(identity) _, comment := test.CreateWorkItemCommentsOK(s.T(), userSvc.Context, userSvc, workitemCommentsCtrl, workitemId, createWorkItemCommentPayload) commentId := *comment.Data.ID s.T().Log(fmt.Sprintf("Created comment with id %v", commentId)) return commentId }
func (rest *TestCommentREST) TestSuccessCreateSingleCommentWithDefaultMarkup() { // given wiid := rest.createDefaultWorkItem() // when p := rest.newCreateWorkItemCommentsPayload("Test", nil) svc, ctrl := rest.SecuredController() _, c := test.CreateWorkItemCommentsOK(rest.T(), svc.Context, svc, ctrl, wiid, p) // then rest.assertComment(c.Data, "Test", rendering.SystemMarkupDefault) }