File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
app/uk/gov/hmrc/agentregistrationfrontend/testonly Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -306,7 +306,7 @@ extends FrontendController(mcc, actions):
306306 ).contains(businessType)
307307 then
308308 Some (CompanyProfile (
309- companyNumber = Crn ( " 12345678 " ),
309+ companyNumber = companyNumberForBusinessType(businessType ),
310310 companyName = if businessType === LimitedCompany then " Test Company Ltd" else " Test Partnership" ,
311311 dateOfIncorporation = Some (LocalDate .now().minusYears(10 )),
312312 unsanitisedCHROAddress = Some (ChroAddress (
@@ -329,3 +329,12 @@ extends FrontendController(mcc, actions):
329329 then Some (" AA1 1AA" )
330330 else None
331331 ))
332+
333+ // these defaults are to match any stubs we have used for Companies House lookups including officer searches
334+ private def companyNumberForBusinessType (businessType : BusinessType ): Crn =
335+ businessType match
336+ case LimitedCompany => Crn (" 11111111" )
337+ case LimitedLiabilityPartnership => Crn (" 22222222" )
338+ case LimitedPartnership => Crn (" 33333333" )
339+ case ScottishLimitedPartnership => Crn (" 44444444" )
340+ case _ => Crn (" 12345678" ) // we don't have a matching CH stub for any other business type so return the original default
Original file line number Diff line number Diff line change @@ -79,6 +79,10 @@ class GrsStubService @Inject() (
7979 organisationType = " 5T"
8080 ))
8181 case _ => None ,
82+ crn = businessType match
83+ case BusinessType .Partnership .LimitedLiabilityPartnership | BusinessType .LimitedCompany | BusinessType .Partnership .LimitedPartnership | BusinessType .Partnership .ScottishLimitedPartnership =>
84+ journeyData.companyProfile.map(_.companyNumber.value)
85+ case _ => None ,
8286 addressDetails = AddressDetails (
8387 addressLine1 = " 1 Test Street" ,
8488 addressLine2 = Some (" Test Area" ),
You can’t perform that action at this time.
0 commit comments