diff --git a/src/SFA.DAS.EmployerAccounts.Web.UnitTests/Orchestrators/EmployerTeamOrchestratorTests/WhenGettingCallToActionViewName.cs b/src/SFA.DAS.EmployerAccounts.Web.UnitTests/Orchestrators/EmployerTeamOrchestratorTests/WhenGettingCallToActionViewName.cs index 28d93143d6..1919ee40bc 100644 --- a/src/SFA.DAS.EmployerAccounts.Web.UnitTests/Orchestrators/EmployerTeamOrchestratorTests/WhenGettingCallToActionViewName.cs +++ b/src/SFA.DAS.EmployerAccounts.Web.UnitTests/Orchestrators/EmployerTeamOrchestratorTests/WhenGettingCallToActionViewName.cs @@ -106,5 +106,21 @@ public void WhenPendingAgreementExists_ThenShouldGetSignAgreementCallToAction( //Assert panelViewModel.ViewName.Should().Be("SignAgreement"); } + + [Test, RecursiveMoqAutoData] + public void WhenNoData_ThenDoNotSetCallToActionViewName( + [NonLevyPanelView] PanelViewModel panelViewModel, + EmployerTeamOrchestrator sut) + { + // Arrange + panelViewModel.Data.CallToActionViewModel = null; + panelViewModel.Data.PendingAgreements.Clear(); + + // Act + sut.GetCallToActionViewName(panelViewModel); + + //Assert + panelViewModel.ViewName.Should().BeNullOrEmpty(); + } } }