diff --git a/LCU.API.Internal.Dispatcher/LCU.Api.Internal.DispatcherTests/RepositoryTests/JobRepositoryTest.cs b/LCU.API.Internal.Dispatcher/LCU.Api.Internal.DispatcherTests/RepositoryTests/JobRepositoryTest.cs index 92dc639..31b7f07 100644 --- a/LCU.API.Internal.Dispatcher/LCU.Api.Internal.DispatcherTests/RepositoryTests/JobRepositoryTest.cs +++ b/LCU.API.Internal.Dispatcher/LCU.Api.Internal.DispatcherTests/RepositoryTests/JobRepositoryTest.cs @@ -292,6 +292,23 @@ public class JobRepositoryTest : DbContextFromJsonTest updatedJob.RequestingApplication = "Test.RequestingApplication.3"; } + [Fact] + public async void Update_Returns_JobErrorRecipients() + { + var foundJob = await _jobRepository.FindByIdExcludingWorkItemsAsync(1085); + + Assert.NotNull(foundJob); + Assert.Empty(foundJob.JobErrorRecipients); + + foundJob.RequestingApplication = "Updated Application"; + + var updatedJob = await _jobRepository.Update(foundJob); + + Assert.NotNull(updatedJob); + Assert.Single(updatedJob.JobErrorRecipients); + Assert.Equal("JoshuaAnnear@landmarkcu.com", updatedJob.JobErrorRecipients.First().Recipient); + } + [Fact] public async void AddAsync_Test() { @@ -392,4 +409,4 @@ public class JobRepositoryTest : DbContextFromJsonTest Assert.NotNull(resultsBasic); Assert.Equal(2, resultsBasic.Count()); } -} \ No newline at end of file +}