Skip to content

Commit

Permalink
DMP-4813 Change update metadata from OffsetDateTime to String so date…
Browse files Browse the repository at this point in the history
… is in expected format

Changed the update metadata request from OffsetDateTime to a formatted string so the output is in the expected format
  • Loading branch information
karen-hedges committed Feb 25, 2025
1 parent c37d547 commit b5f400e
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,12 @@ void calculateEventDates_WithTranscriptionSuccessfulUpdate() {
armRetentionEventDateProcessor.calculateEventDates(1000);

// then
var persistedEod = dartsDatabase.getExternalObjectDirectoryRepository().findById(armEod.getId()).orElseThrow();
log.info("EOD event date time {}", armEod.getEventDateTs().truncatedTo(MILLIS));
log.info("Retention date time {}", RETENTION_DATE_TIME.truncatedTo(MILLIS));
assertFalse(persistedEod.isUpdateRetention());
assertEquals(0, persistedEod.getEventDateTs().truncatedTo(MILLIS).compareTo(RETENTION_DATE_TIME.truncatedTo(MILLIS)));

UpdateMetadataRequest expectedMetadataRequest = UpdateMetadataRequest.builder()
.itemId(externalRecordId)
.manifest(UpdateMetadataRequest.Manifest.builder()
Expand All @@ -295,9 +301,6 @@ void calculateEventDates_WithTranscriptionSuccessfulUpdate() {
.build();
verify(armApiClient, times(1)).updateMetadata("Bearer " + BEARER_TOKEN, expectedMetadataRequest);

var persistedEod = dartsDatabase.getExternalObjectDirectoryRepository().findById(armEod.getId()).orElseThrow();
assertTrue(persistedEod.isUpdateRetention());
assertEquals(0, persistedEod.getEventDateTs().truncatedTo(MILLIS).compareTo(RETENTION_DATE_TIME.truncatedTo(MILLIS)));
}

@Test
Expand Down

0 comments on commit b5f400e

Please sign in to comment.