Pārlūkot izejas kodu

Death Certificate Updates Date of Death

Andrew Grant 4 mēneši atpakaļ
vecāks
revīzija
a84187731d

+ 8 - 0
src/test/java/scot/carricksoftware/grants/controllers/certificates/deathcertificates/DeathCertificateFormControllerSaveOrUpdateTest.java

@@ -110,4 +110,12 @@ public class DeathCertificateFormControllerSaveOrUpdateTest {
         verify(capitaliseDeathCertificateMock).capitalise(deathCertificateCommand);
     }
 
+    @Test
+    public void yearOfDeathIsUpdatedTest() {
+        when(deathCertificateServiceMock.saveDeathCertificateCommand(any(DeathCertificateCommand.class))).thenReturn(deathCertificateCommand);
+        deathCertificateCommand.setId(4L);
+        deathCertificateController.saveOrUpdate(deathCertificateCommand, bindingResultMock, modelMock);
+        verify(updateCertifiedYearOfDeathMock).updateCertifiedYearOfDeath(deathCertificateCommand);
+    }
+
 }