Skip to content

Commit

Permalink
bugfix/fixed the regex for UrlValidation- add test
Browse files Browse the repository at this point in the history
  • Loading branch information
hongwei1 committed Nov 23, 2023
1 parent 9081358 commit 7be52e4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions obp-api/src/test/scala/code/util/APIUtilTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,15 @@ class APIUtilTest extends FeatureSpec with Matchers with GivenWhenThen with Prop
APIUtil.getObpFormatOperationId("OBPv3.0.0-getCoreAccountById") should be ("OBPv3.0.0-getCoreAccountById")
APIUtil.getObpFormatOperationId("xxx") should be ("xxx")
}

feature("test APIUtil.basicUrlValidation method") {
val testString1 = "https%3A%2F%2Fapisandbox.openbankproject.com%2Foauth%2Fauthorize%3Fnext%3D%2Fen%2Fusers%2Fmyuser%26oauth_token%3DWTOBT2YRCTMI1BCCF4XAIKRXPLLZDZPFAIL5K03Z%26oauth_verifier%3D45381"
val testString2 = "http%3A%2F%2Flocalhost%3A8016%3Foauth_token%3DEBRZBMOPDXEUGGJP421FPFGK01IY2DGM5O3TLVSK%26oauth_verifier%3D63461"

APIUtil.basicUrlValidation(testString1) should be (true)
APIUtil.basicUrlValidation(testString2) should be (true)

}

feature("test APIUtil.getBankIdAccountIdPairsFromUserAuthContexts method") {

Expand Down

0 comments on commit 7be52e4

Please sign in to comment.