Skip to content

Commit

Permalink
change type of GrantApplicant user_id to reflect migration, fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
a-lor-cab committed Jul 26, 2023
1 parent 3869c3e commit 38dd141
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import javax.persistence.*;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

@NoArgsConstructor
@AllArgsConstructor
Expand All @@ -23,7 +22,7 @@ public class GrantApplicant {
private long id;

@Column
private UUID userId;
private String userId;

@OneToOne(mappedBy = "applicant")
@JsonIgnoreProperties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void forSingleRowWithGoodData() throws IOException {
final SubmissionDefinition submissionDefinition = randomSubmissionDefinition(SUBMISSION_DEFINITION).build();
final Submission submission = RandomSubmissionGenerator.randomSubmission()
.status(SubmissionStatus.SUBMITTED)
.createdBy(GrantApplicant.builder().id(1).userId(UUID.randomUUID()).build())
.createdBy(GrantApplicant.builder().id(1).userId(UUID.randomUUID().toString()).build())
.definition(submissionDefinition).build();

when(applicationFormService.retrieveApplicationFormSummary(1, false, false)).thenReturn(applicationFormDTO);
Expand All @@ -121,13 +121,13 @@ void ignoresBadDataRows() throws IOException {

final SubmissionDefinition goodSubmission = createSubmissionDefinition();
final Submission goodSubmissionEntity = randomSubmission().status(SubmissionStatus.SUBMITTED)
.createdBy(GrantApplicant.builder().id(1).userId(UUID.randomUUID()).build())
.createdBy(GrantApplicant.builder().id(1).userId(UUID.randomUUID().toString()).build())
.gapId("GAP-LL-20221006-1").definition(goodSubmission).build();

final SubmissionDefinition badSubmission = createSubmissionDefinition();
badSubmission.getSections().get(1).getQuestionById("APPLICANT_ORG_NAME").setResponse(null);
final Submission badSubmissionEntity = randomSubmission().status(SubmissionStatus.SUBMITTED)
.createdBy(GrantApplicant.builder().id(1).userId(UUID.randomUUID()).build())
.createdBy(GrantApplicant.builder().id(1).userId(UUID.randomUUID().toString()).build())
.gapId("GAP-LL-20221006-2").definition(badSubmission).build();

when(submissionRepository.findByApplicationGrantApplicationIdAndStatus(1, SubmissionStatus.SUBMITTED))
Expand Down

0 comments on commit 38dd141

Please sign in to comment.