Skip to content

Commit

Permalink
Merge pull request #59 from hmrc/api4update
Browse files Browse the repository at this point in the history
updated the route from NINO to nino
  • Loading branch information
MJCallahanPage authored Mar 6, 2017
2 parents 429adb0 + a9eb825 commit a0ad6e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion app/connectors/RegistrationConnector.scala
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ class RegistrationConnector @Inject()(config: Configuration,
lazy val urlHeaderAuthorization: String = s"Bearer ${config.getString("microservice.services.des.authorization-token").fold("")(x => x)}"
lazy val registrationServiceUrl: String = baseUrl("des")

val newRegistrationUrl: String => String = (nino: String) => s"$registrationServiceUrl/registration/individual/NINO/$nino"
// DES API numbering [MTD API numbering]
// API4 [API 9]
val newRegistrationUrl: String => String = (nino: String) => s"$registrationServiceUrl/registration/individual/nino/$nino"

// API 1(b) [API 1 (b)]
val getRegistrationUrl: String => String = (nino: String) => s"$registrationServiceUrl/registration/details?nino=$nino"

def createHeaderCarrierPost(headerCarrier: HeaderCarrier): HeaderCarrier =
Expand Down
2 changes: 1 addition & 1 deletion test/unit/connectors/RegistrationConnectorSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class RegistrationConnectorSpec extends MockRegistrationConnector {
}

"Post to the correct url" in {
TestRegistrationConnector.newRegistrationUrl(testNino) should endWith(s"/registration/individual/NINO/$testNino")
TestRegistrationConnector.newRegistrationUrl(testNino) should endWith(s"/registration/individual/nino/$testNino")
}

def result = await(TestRegistrationConnector.register(testNino, registerRequestPayload))
Expand Down

0 comments on commit a0ad6e3

Please sign in to comment.