Skip to content

Commit

Permalink
Merge pull request #1489 from wordpress-mobile/fix_wpcomrequest_test
Browse files Browse the repository at this point in the history
Use Site directly instead of Site Store in test
  • Loading branch information
oguzkocer authored Jan 29, 2020
2 parents 52a0f0f + d2118a0 commit a38f48b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ReleaseStack_ReactNativeWPComRequestTest : ReleaseStack_WPComBase() {

@Test
fun testWpComCall() {
val url = "https://public-api.wordpress.com/wp/v2/sites/${siteFromDb.siteId}/media"
val url = "https://public-api.wordpress.com/wp/v2/sites/${sSite.siteId}/media"
val params = mapOf("context" to "edit")
val response = runBlocking { reactNativeStore.performWPComRequest(url, params) }

Expand All @@ -30,7 +30,7 @@ class ReleaseStack_ReactNativeWPComRequestTest : ReleaseStack_WPComBase() {

@Test
fun testWpComCall_fails() {
val url = "https://public-api.wordpress.com/wp/v2/sites/${siteFromDb.siteId}/an-invalid-extension"
val url = "https://public-api.wordpress.com/wp/v2/sites/${sSite.siteId}/an-invalid-extension"
val response = runBlocking { reactNativeStore.performWPComRequest(url, emptyMap()) }

val assertionMessage = "Call should have failed with a 404, instead response was $response"
Expand Down

0 comments on commit a38f48b

Please sign in to comment.