diff --git a/omod-2.2/src/test/java/org/openmrs/module/webservices/rest/web/v1_0/controller/openmrs2_2/PersonController2_2Test.java b/omod-2.2/src/test/java/org/openmrs/module/webservices/rest/web/v1_0/controller/openmrs2_2/PersonController2_2Test.java index 24eaea442..bc92c56db 100644 --- a/omod-2.2/src/test/java/org/openmrs/module/webservices/rest/web/v1_0/controller/openmrs2_2/PersonController2_2Test.java +++ b/omod-2.2/src/test/java/org/openmrs/module/webservices/rest/web/v1_0/controller/openmrs2_2/PersonController2_2Test.java @@ -85,4 +85,14 @@ public void shouldEditAPersonBirthTime() throws Exception { assertNotNull(responsePersonContents); //assertEquals("1970-01-01T20:20:00.000+0000", PropertyUtils.getProperty(responsePersonContents, "birthtime").toString()); } + @Test + public void shouldCreatePersonWithBirthtime() throws Exception { + String json = "{ \"gender\": \"M\", " + "\"age\": 47, " + "\"birthdate\": \"1970-01-01T00:00:00.000+0100\", " + + "\"birthdateEstimated\": false, " + "\"dead\": false, " + "\"deathDate\": null, "+ "\"birthtime\": \"1970-01-01T18:18:00.000\", " + + "\"causeOfDeath\": null, " + "\"names\": [{\"givenName\": \"Thomas\", \"familyName\": \"Smith\"}] " + "}}"; + + SimpleObject newPerson = deserialize(handle(newPostRequest(getURI(), json))); + + assertNotNull(PropertyUtils.getProperty(newPerson, "uuid")); + } }