Skip to content

Commit

Permalink
Merge pull request #32 from hmrc/DC-3250
Browse files Browse the repository at this point in the history
DC-3250: adding sent to allowed parameters
  • Loading branch information
rwalpole authored Mar 11, 2021
2 parents b9e0f90 + 9cf9247 commit c6d5465
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/controllers/ConversationInboxController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class ConversationInboxController @Inject()(
customerEnrolments: Option[List[CustomerEnrolment]],
tags: Option[List[Tag]]): Action[AnyContent] = Action.async { implicit request =>
implicit val hc: HeaderCarrier = HeaderCarrierConverter.fromRequest(request)
validateQueryParameters(request.queryString, "enrolment", "enrolmentKey", "tag") match {
validateQueryParameters(request.queryString, "enrolment", "enrolmentKey", "tag", "sent") match {
case Left(e) => Future.successful(BadRequest(e.getMessage))
case _ =>
authorised() {
Expand Down
4 changes: 3 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ val silencerVersion = "1.7.0"
lazy val externalServices = List(
ExternalService("DATASTREAM"),
ExternalService("AUTH"),
ExternalService("AUTH_LOGIN_API"),
ExternalService("IDENTITY_VERIFICATION"),
ExternalService("USER_DETAILS"),
ExternalService("SECURE_MESSAGE_FRONTEND"),
ExternalService("SECURE_MESSAGE")
ExternalService("SECURE_MESSAGE"),
ExternalService("EMAIL")
)

lazy val wartremoverSettings =
Expand Down
5 changes: 3 additions & 2 deletions it/ConversationInboxPartialISpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import scala.concurrent.{ ExecutionContext, Future }
@SuppressWarnings(Array("org.wartremover.warts.NonUnitStatements"))
class ConversationInboxPartialISpec extends PlaySpec with ServiceSpec with MockitoSugar with BeforeAndAfterEach {

override def externalServices: Seq[String] = Seq("auth-login-api")
override def externalServices: Seq[String] = Seq.empty

private val mockSecureMessageConnector = mock[SecureMessageConnector]

Expand Down Expand Up @@ -97,7 +97,8 @@ class ConversationInboxPartialISpec extends PlaySpec with ServiceSpec with Mocki
}

object AuthUtil {
lazy val ggAuthPort: Int = externalServicePorts("auth-login-api")

lazy val ggAuthPort: Int = 8585

implicit val deserialiser: Reads[GatewayToken] = Json.reads[GatewayToken]

Expand Down
4 changes: 2 additions & 2 deletions it/ConversationMessagesPartialISpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import play.api.http.Status.OK
@SuppressWarnings(Array("org.wartremover.warts.All"))
class ConversationMessagesPartialISpec extends PlaySpec with ServiceSpec with MockitoSugar with BeforeAndAfterEach {

override def externalServices: Seq[String] = Seq("auth-login-api")
override def externalServices: Seq[String] = Seq.empty

private val mockSecureMessageConnector = mock[SecureMessageConnector]

Expand Down Expand Up @@ -92,7 +92,7 @@ class ConversationMessagesPartialISpec extends PlaySpec with ServiceSpec with Mo
.post(payload)
.futureValue

lazy val ggAuthPort: Int = externalServicePorts("auth-login-api")
lazy val ggAuthPort: Int = 8585

implicit val deserialiser: Reads[GatewayToken] = Json.reads[GatewayToken]

Expand Down
6 changes: 3 additions & 3 deletions it/ConversationPartialISpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import play.api.http.Status.OK

@SuppressWarnings(Array("org.wartremover.warts.All"))
class ConversationPartialISpec extends PlaySpec with ServiceSpec with MockitoSugar with BeforeAndAfterEach {
override def externalServices: Seq[String] = Seq("auth-login-api", "secure-message")
val secureMessagePort = externalServicePorts("secure-message")
override def externalServices: Seq[String] = Seq.empty
val secureMessagePort: Int = 9051

override protected def beforeEach() = {
(wsClient
Expand Down Expand Up @@ -85,7 +85,7 @@ class ConversationPartialISpec extends PlaySpec with ServiceSpec with MockitoSug
.post(payload)
.futureValue

lazy val ggAuthPort: Int = externalServicePorts("auth-login-api")
lazy val ggAuthPort: Int = 8585

implicit val deserialiser: Reads[GatewayToken] = Json.reads[GatewayToken]

Expand Down

0 comments on commit c6d5465

Please sign in to comment.