From afb6e9e198f21055aaa8101a9aa38c5a30b0ad05 Mon Sep 17 00:00:00 2001 From: Carl Thompson Date: Mon, 21 Oct 2024 15:58:33 +0100 Subject: [PATCH] fetch address was being errased on IsTheAddressCorrectPage = true - fixed --- .../IsRegisteredBusiness/IsTheAddressCorrectPage.scala | 1 - .../IsRegisteredBusiness/IsTheAddressCorrectPageSpec.scala | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/pages/addFinancialInstitution/IsRegisteredBusiness/IsTheAddressCorrectPage.scala b/app/pages/addFinancialInstitution/IsRegisteredBusiness/IsTheAddressCorrectPage.scala index 13fb35f..412fe2a 100644 --- a/app/pages/addFinancialInstitution/IsRegisteredBusiness/IsTheAddressCorrectPage.scala +++ b/app/pages/addFinancialInstitution/IsRegisteredBusiness/IsTheAddressCorrectPage.scala @@ -44,7 +44,6 @@ case object IsTheAddressCorrectPage extends QuestionPage[Boolean] { NonUkAddressPage, PostcodePage, SelectedAddressLookupPage, - FetchedRegisteredAddressPage, IsThisAddressPage, UkAddressPage ) diff --git a/test/pages/addFinancialInstitution/IsRegisteredBusiness/IsTheAddressCorrectPageSpec.scala b/test/pages/addFinancialInstitution/IsRegisteredBusiness/IsTheAddressCorrectPageSpec.scala index 1bf0244..ac68947 100644 --- a/test/pages/addFinancialInstitution/IsRegisteredBusiness/IsTheAddressCorrectPageSpec.scala +++ b/test/pages/addFinancialInstitution/IsRegisteredBusiness/IsTheAddressCorrectPageSpec.scala @@ -40,11 +40,11 @@ class IsTheAddressCorrectPageSpec extends PageBehaviours { "when true" in { val result = IsTheAddressCorrectPage.cleanup(Some(true), userAnswersForAddFI.withPage(FetchedRegisteredAddressPage, testAddressResponse)) + result.get.data.value must contain key (FetchedRegisteredAddressPage.toString) result.get.data.value must not contain key(WhereIsFIBasedPage.toString) result.get.data.value must not contain key(NonUkAddressPage.toString) result.get.data.value must not contain key(PostcodePage.toString) result.get.data.value must not contain key(SelectedAddressLookupPage.toString) - result.get.data.value must not contain key(FetchedRegisteredAddressPage.toString) result.get.data.value must not contain key(IsThisAddressPage.toString) result.get.data.value must not contain key(UkAddressPage.toString) }