Skip to content

Commit

Permalink
Remove tests for removed screens
Browse files Browse the repository at this point in the history
  • Loading branch information
spokenbird authored and bseeger committed Jun 18, 2024
1 parent c08ff22 commit 3c215f0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 38 deletions.
3 changes: 0 additions & 3 deletions src/main/java/org/mdbenefits/app/inputs/MdBenefitsFlow.java
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,6 @@ public class MdBenefitsFlow extends FlowInputs {
@Money(message = "{error.invalid-money}")
private String additionalIncomeOther;

@NotEmpty
private List<String> moneyOnHandTypes;

@Money(message = "{error.invalid-money}")
@NotBlank(message = "{error.missing-dollar-amount}")
private String monthlyHouseholdIncome;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,41 +105,6 @@ public void testAdditionalIncome() {
assertThat(yesRow.getValue()).isEqualToIgnoringCase("Yes");
}


@Test
public void testPrepareMoneyOnHandResourcesDoesNotAddWhenNONEisPresent() {
Submission submission = new SubmissionTestBuilder()
.withPersonalInfo("Person", "One", "", "", "", "", "", "", "", "")
.with("moneyOnHandTypes[]", List.of(NONE_OF_ABOVE_SELECTION_VALUE))
.build();

Map<String, SubmissionField> result = incomePreparer.prepareSubmissionFields(submission, null);
assertThat(result.get("householdHasResourcesOrAssets"))
.isEqualTo(new SingleField("householdHasResourcesOrAssets", "false", null));
}

@Test
public void testPrepareMoneyOnHandResourcesAddsRelevantItems() {
Submission submission = new SubmissionTestBuilder()
.withPersonalInfo("Person", "One", "", "", "", "", "", "", "", "")
.with("moneyOnHandTypes[]", List.of("CHECKING", "SAVINGS", "BONDS"))
.build();

Map<String, SubmissionField> result = incomePreparer.prepareSubmissionFields(submission, null);

assertThat(withNoJobIncome(result).size()).isEqualTo(4);
assertThat(result.get("householdHasResourcesOrAssets"))
.isEqualTo(new SingleField("householdHasResourcesOrAssets", "true", null));
assertThat(result.get("resourcesOrAssetsType1"))
.isEqualTo(new SingleField("resourcesOrAssetsType1", "Checking account", null));

assertThat(result.get("resourcesOrAssetsType2"))
.isEqualTo(new SingleField("resourcesOrAssetsType2", "Savings account", null));

assertThat(result.get("resourcesOrAssetsType3"))
.isEqualTo(new SingleField("resourcesOrAssetsType3", "Bonds", null));
}

private void assertJobIncome(Map<String, SubmissionField> results, String expected) {
assertThat(results).containsKey("householdHasEarnedIncome");
var hasIncomeField = (SingleField) results.get("householdHasEarnedIncome");
Expand Down

0 comments on commit 3c215f0

Please sign in to comment.