Added bitlinks tests.

This commit is contained in:
Erik C. Thauvin 2020-02-27 00:42:29 -08:00
parent 06ea6b91a2
commit 64e9eb2f55
2 changed files with 13 additions and 0 deletions

View file

@ -92,4 +92,14 @@ class BitlyTest {
fun `get user`() {
assertTrue(bitly.call(Utils.buildEndPointUrl("user"), emptyMap(), Methods.GET).contains("\"login\":"))
}
@Test
fun `bitlinks shorten`() {
assertEquals(shortUrl, Bitlinks(bitly.accessToken).shorten(longUrl, domain="bit.ly"))
}
@Test
fun `bitlinks expand`() {
assertEquals(longUrl, Bitlinks(bitly.accessToken).expand(shortUrl))
}
}