Skip to content

Commit

Permalink
Update environment URLs. (#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
sshropshire authored Feb 28, 2024
1 parent 3689094 commit ad797ec
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package com.paypal.android.corepayments

enum class Environment(internal val url: String, internal val graphQLEndpoint: String) {
LIVE(
"https://api.paypal.com",
"https://api-m.paypal.com",
"https://www.paypal.com"
),
SANDBOX(
"https://api.sandbox.paypal.com",
"https://api-m.sandbox.paypal.com",
"https://www.sandbox.paypal.com"
),
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ class EnvironmentUnitTest {

@Test
fun `it should return the correct url for the LIVE environment`() {
assertEquals("https://api.paypal.com", Environment.LIVE.url)
assertEquals("https://api-m.paypal.com", Environment.LIVE.url)
}

@Test
fun `it should return the correct url for the SANDBOX environment`() {
assertEquals("https://api.sandbox.paypal.com", Environment.SANDBOX.url)
assertEquals("https://api-m.sandbox.paypal.com", Environment.SANDBOX.url)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class RestClientUnitTest {
sut.send(apiGETRequest)

val httpRequest = httpRequestSlot.captured
assertEquals(URL("https://api.sandbox.paypal.com/sample/path"), httpRequest.url)
assertEquals(URL("https://api-m.sandbox.paypal.com/sample/path"), httpRequest.url)
}

@Test
Expand All @@ -59,7 +59,7 @@ class RestClientUnitTest {
sut.send(apiGETRequest)

val httpRequest = httpRequestSlot.captured
assertEquals(URL("https://api.paypal.com/sample/path"), httpRequest.url)
assertEquals(URL("https://api-m.paypal.com/sample/path"), httpRequest.url)
}

@Test
Expand Down

0 comments on commit ad797ec

Please sign in to comment.