Skip to content

Commit

Permalink
test for no call to action data
Browse files Browse the repository at this point in the history
  • Loading branch information
cofaulco committed Jul 5, 2022
1 parent bf0d6bf commit 4cd2e66
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,21 @@ public void WhenPendingAgreementExists_ThenShouldGetSignAgreementCallToAction(
//Assert
panelViewModel.ViewName.Should().Be("SignAgreement");
}

[Test, RecursiveMoqAutoData]
public void WhenNoData_ThenDoNotSetCallToActionViewName(
[NonLevyPanelView] PanelViewModel<AccountDashboardViewModel> panelViewModel,
EmployerTeamOrchestrator sut)
{
// Arrange
panelViewModel.Data.CallToActionViewModel = null;
panelViewModel.Data.PendingAgreements.Clear();

// Act
sut.GetCallToActionViewName(panelViewModel);

//Assert
panelViewModel.ViewName.Should().BeNullOrEmpty();
}
}
}

0 comments on commit 4cd2e66

Please sign in to comment.