Add assessment declaration Word form
This commit is contained in:
1 parent
e4cfd299d1
commit
50003778f1
5 files changed
+50
-5
No files matched your search
@@ -492,11 +492,20 @@ public sealed class ApprovalsControllerTests
|
||||
var progress = Assert.IsType<ApprovalProgressResponse>(Assert.IsType<OkObjectResult>(response.Result).Value);
|
||||
Assert.Equal(new[] { "submitted", "counselorApproved", "collegeRejected" }, progress.Steps.Select(x => x.Kind));
|
||||
Assert.Equal("证据不足", progress.Steps[2].Comment);
|
||||
var form = Assert.IsType<FileContentResult>(await fixture.Controller.DownloadApprovalForm("AssessmentDeclaration", declaration.Id, CancellationToken.None));
|
||||
using (var word = DocumentFormat.OpenXml.Packaging.WordprocessingDocument.Open(new MemoryStream(form.FileContents), false))
|
||||
{
|
||||
var text = word.MainDocumentPart!.Document!.Body!.InnerText;
|
||||
Assert.Contains("材料", text);
|
||||
Assert.Contains("初审通过", text);
|
||||
Assert.Contains("证据不足", text);
|
||||
}
|
||||
var appealResponse = await fixture.Controller.GetProgress("AssessmentAppeal", appeal.Id, CancellationToken.None);
|
||||
var appealProgress = Assert.IsType<ApprovalProgressResponse>(Assert.IsType<OkObjectResult>(appealResponse.Result).Value);
|
||||
Assert.Equal(new[] { "submitted", "approved" }, appealProgress.Steps.Select(x => x.Kind));
|
||||
var outsider = new ApprovalsController(fixture.Db, new CounselorDataScope(Guid.NewGuid()));
|
||||
Assert.IsType<NotFoundResult>((await outsider.GetProgress("AssessmentDeclaration", declaration.Id, CancellationToken.None)).Result);
|
||||
Assert.IsType<NotFoundResult>(await outsider.DownloadApprovalForm("AssessmentDeclaration", declaration.Id, CancellationToken.None));
|
||||
Assert.IsType<NotFoundResult>((await outsider.GetProgress("AssessmentAppeal", appeal.Id, CancellationToken.None)).Result);
|
||||
declaration.Status = ComprehensiveAssessmentDeclarationStatus.Withdrawn;
|
||||
declaration.CounselorReviewedAt = null;
|
||||
|
||||
Reference in new issue
Block a user