Added bitlinks tests.
This commit is contained in:
parent
06ea6b91a2
commit
64e9eb2f55
2 changed files with 13 additions and 0 deletions
|
@ -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))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue