Search in sources :

Example 16 with IssueCommentVO

use of com.epam.pipeline.controller.vo.IssueCommentVO in project cloud-pipeline by epam.

the class IssueApiServiceTest method testUpdateCommentAccessDenied.

@WithMockUser(username = NO_PERMISSION_USER)
@Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
@Test(expected = AccessDeniedException.class)
public void testUpdateCommentAccessDenied() {
    IssueCommentVO issueCommentVO = new IssueCommentVO();
    issueCommentVO.setText(COMMENT_TEXT);
    issueApiService.updateComment(createdIssue.getId(), createdIssueComment.getId(), issueCommentVO);
}
Also used : IssueCommentVO(com.epam.pipeline.controller.vo.IssueCommentVO) WithMockUser(org.springframework.security.test.context.support.WithMockUser) AbstractManagerTest(com.epam.pipeline.manager.AbstractManagerTest) Test(org.junit.Test) Transactional(org.springframework.transaction.annotation.Transactional)

Aggregations

IssueCommentVO (com.epam.pipeline.controller.vo.IssueCommentVO)16 Transactional (org.springframework.transaction.annotation.Transactional)14 Test (org.junit.Test)13 Issue (com.epam.pipeline.entity.issue.Issue)11 AbstractSpringTest (com.epam.pipeline.AbstractSpringTest)9 IssueComment (com.epam.pipeline.entity.issue.IssueComment)6 AbstractManagerTest (com.epam.pipeline.manager.AbstractManagerTest)4 WithMockUser (org.springframework.security.test.context.support.WithMockUser)4 EntityVO (com.epam.pipeline.controller.vo.EntityVO)2 IssueVO (com.epam.pipeline.controller.vo.IssueVO)2 AttachmentDao (com.epam.pipeline.dao.issue.AttachmentDao)2 Attachment (com.epam.pipeline.entity.issue.Attachment)2 IssueStatus (com.epam.pipeline.entity.issue.IssueStatus)2 AclClass (com.epam.pipeline.entity.security.acl.AclClass)2 NotificationManager (com.epam.pipeline.manager.notification.NotificationManager)2 AuthManager (com.epam.pipeline.manager.security.AuthManager)2 IssueMapper (com.epam.pipeline.mapper.IssueMapper)2 Collections (java.util.Collections)2 List (java.util.List)2 Map (java.util.Map)2