From d4f64414eea4ddce3f5df782d292546048fae9c1 Mon Sep 17 00:00:00 2001 From: petekirby-ee Date: Thu, 16 May 2024 15:00:17 +0100 Subject: [PATCH] APIS-7016 Fix 'LaxEmailAddress' in audit detail (#495) --- .../gov/hmrc/thirdpartyapplication/services/AuditService.scala | 2 +- .../hmrc/thirdpartyapplication/services/AuditServiceSpec.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/uk/gov/hmrc/thirdpartyapplication/services/AuditService.scala b/app/uk/gov/hmrc/thirdpartyapplication/services/AuditService.scala index 00d8cacc3..04447d2a0 100644 --- a/app/uk/gov/hmrc/thirdpartyapplication/services/AuditService.scala +++ b/app/uk/gov/hmrc/thirdpartyapplication/services/AuditService.scala @@ -426,7 +426,7 @@ object AuditHelper { "applicationId" -> app.id.value.toString, "applicationName" -> app.name, "upliftRequestedByEmail" -> app.state.requestedByEmailAddress.getOrElse("-"), - "applicationAdmins" -> app.admins.map(_.emailAddress).mkString(", ") + "applicationAdmins" -> app.admins.map(_.emailAddress.text).mkString(", ") ) def calculateAppChanges(previous: StoredApplication, updated: StoredApplication) = { diff --git a/test/uk/gov/hmrc/thirdpartyapplication/services/AuditServiceSpec.scala b/test/uk/gov/hmrc/thirdpartyapplication/services/AuditServiceSpec.scala index 36d41d0aa..30581f643 100644 --- a/test/uk/gov/hmrc/thirdpartyapplication/services/AuditServiceSpec.scala +++ b/test/uk/gov/hmrc/thirdpartyapplication/services/AuditServiceSpec.scala @@ -200,7 +200,7 @@ class AuditServiceSpec extends AsyncHmrcSpec with ApplicationStateUtil "applicationId" -> appInTesting.id.value.toString, "applicationName" -> appInTesting.name, "upliftRequestedByEmail" -> appInTesting.state.requestedByEmailAddress.getOrElse("-"), - "applicationAdmins" -> appInTesting.admins.map(_.emailAddress).mkString(", ") + "applicationAdmins" -> appInTesting.admins.map(_.emailAddress.text).mkString(", ") ) val extraDetail = questionsWithAnswers ++ declinedData ++ dates ++ counters ++ gatekeeperDetails