Skip to content

Commit

Permalink
Merge pull request #20748 from guardian/le-bump-libphonenumber-version
Browse files Browse the repository at this point in the history
Bump version of libphonenumber and add test
  • Loading branch information
laurenemms committed Nov 21, 2018
2 parents a333aea + 39b7017 commit c9c367b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions identity/test/form/TelephoneNumberMappingTest.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package form

import com.google.i18n.phonenumbers.PhoneNumberUtil
import org.scalatest.{Matchers, WordSpec}

class TelephoneNumberMappingTest extends WordSpec with Matchers {
Expand All @@ -13,6 +14,13 @@ class TelephoneNumberMappingTest extends WordSpec with Matchers {
TelephoneNumberFormData(Some("44"), Some("020 3353 2000")).isValid shouldBe true
}

// This test addresses a user's complaint that this number was being determined invalid. This was fixed with
// libphonenumber library updates in both Identity Api and Frontend

"be valid if a Solomon Island number is used starting 71" in {
TelephoneNumberFormData(Some("677"), Some("7135649")).isValid shouldBe true
}

"be invalid if country code is provided and local number is not" in {
TelephoneNumberFormData(Some("44"), None).isValid shouldBe false
}
Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ object Dependencies {
val jerseyCore = "com.sun.jersey" % "jersey-core" % jerseyVersion
val jerseyClient = "com.sun.jersey" % "jersey-client" % jerseyVersion
val w3cSac = "org.w3c.css" % "sac" % "1.3"
val libPhoneNumber = "com.googlecode.libphonenumber" % "libphonenumber" % "7.2.4"
val libPhoneNumber = "com.googlecode.libphonenumber" % "libphonenumber" % "8.10.0"
val logback = "net.logstash.logback" % "logstash-logback-encoder" % "4.6"
val kinesisLogbackAppender = "com.gu" % "kinesis-logback-appender" % "1.4.0"
val targetingClient = "com.gu" %% "targeting-client-play26" % "0.14.5"
Expand Down

0 comments on commit c9c367b

Please sign in to comment.