test: 存档确认最小权限用例挂起,待 #45 决策
This commit is contained in:
@@ -148,6 +148,25 @@ class ApprovalConfirmArchiveIT {
|
||||
+ "AND action = 'CONFIRM' AND opinion IS NOT NULL", instanceId)).isZero();
|
||||
}
|
||||
|
||||
/**
|
||||
* 回归 #45:按 #11/#14,存档确认是报送人本人的动作,不应要求 approval:instance:approve。
|
||||
* 当前实现 403,掩盖于测试给 reporter 免费发放 APPROVE;待决策(权限授予或改 @PreAuthorize)后
|
||||
* 按结论启用或改写本用例。
|
||||
*/
|
||||
@Test
|
||||
@org.junit.jupiter.api.Disabled("待 #45 决策:仅持 submit 的报送人当前无法确认自己的存档任务")
|
||||
void reporterWithoutApproveAuthorityConfirmsOwnArchiveTask() throws Exception {
|
||||
long instanceId = createAndSubmit("最小权限存档");
|
||||
approveByLeader(instanceId);
|
||||
long reporterTask = pendingTaskId(instanceId, reporter.userId);
|
||||
|
||||
mockMvc.perform(authed(post("/api/approval/task/" + reporterTask + "/confirm"),
|
||||
reporter, organizationId, SUBMIT))
|
||||
.andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.code").value(0))
|
||||
.andExpect(jsonPath("$.data.status").value("APPROVED"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void archivesOnceAndCancelsOtherArchiveTasks() throws Exception {
|
||||
long instanceId = createAndSubmit("归档或签");
|
||||
|
||||
Reference in New Issue
Block a user