Skip to content

Commit

Permalink
Merge pull request #915 from hmrc/BDOG-3170-derives
Browse files Browse the repository at this point in the history
Align external test slug-info flag
  • Loading branch information
colin-lamed authored Jul 3, 2024
2 parents f184dac + a6265c2 commit 7d00fc0
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions app/uk/gov/hmrc/cataloguefrontend/model/Environment.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,7 @@ enum Environment(


given Parser[SlugInfoFlag] =
// TODO service-dependencies currently represents `external test` with a space
//Parser.parser(SlugInfoFlag.values)
(s: String) =>
if s == "external test"
then Right(SlugInfoFlag.ForEnvironment(Environment.ExternalTest))
else SlugInfoFlag.values
.find(_.asString == s)
.toRight(s"Invalid value: \"$s\" - should be one of: ${SlugInfoFlag.values.map(_.asString).mkString(", ")}")
Parser.parser(SlugInfoFlag.values)

trait SlugInfoFlag
extends FromString
Expand Down

0 comments on commit 7d00fc0

Please sign in to comment.