Revert "Added CallResponse and Bitlinks.udpate()."

This reverts commit 05ee938de7fac49026118a53f5af02ff26d82ccd.
This commit is contained in:
Erik C. Thauvin 2020-03-03 13:33:19 -08:00
parent 87350f0d51
commit 9ba23fd6c3
24 changed files with 34 additions and 184 deletions

View file

@ -34,6 +34,7 @@ package net.thauvin.erik.bitly
import net.thauvin.erik.bitly.Utils.Companion.removeHttp
import net.thauvin.erik.bitly.Utils.Companion.toEndPoint
import org.json.JSONObject
import org.junit.Before
import java.io.File
import java.util.logging.Level
@ -96,16 +97,16 @@ class BitlyTest {
@Test
fun `get user`() {
assertTrue(bitly.call("/user".toEndPoint(), method = Methods.GET).isSuccessful)
assertTrue(bitly.call("/user".toEndPoint(), method = Methods.GET).contains("\"login\":"))
}
@Test
fun `created by`() {
assertEquals(
"ethauvin",
bitly.call("/bitlinks/${shortUrl.removeHttp()}".toEndPoint(), method = Methods.GET)
.toJson()
.getString("created_by")
JSONObject(
bitly.call("/bitlinks/${shortUrl.removeHttp()}".toEndPoint(), method = Methods.GET)
).getString("created_by")
)
}
@ -137,12 +138,4 @@ class BitlyTest {
)
)
}
@Test
fun `update bitlink`() {
assertEquals(
Constants.TRUE,
bitly.bitlinks().update(shortUrl, title = "Erik's Weblog", tags = arrayOf("blog", "weblog"))
)
}
}