Added more tests
This commit is contained in:
parent
708869deb1
commit
725ea3b23b
1 changed files with 10 additions and 1 deletions
|
@ -197,6 +197,12 @@ class BitlyTest {
|
||||||
|
|
||||||
bl.update(shortUrl, link = longUrl)
|
bl.update(shortUrl, link = longUrl)
|
||||||
assertThat(bl.lastCallResponse).prop(CallResponse::isUnprocessableEntity).isTrue()
|
assertThat(bl.lastCallResponse).prop(CallResponse::isUnprocessableEntity).isTrue()
|
||||||
|
|
||||||
|
bl.update("bit.ly/407GjJU", id = "foo")
|
||||||
|
assertThat(bl.lastCallResponse).all {
|
||||||
|
prop(CallResponse::isForbidden).isTrue()
|
||||||
|
prop(CallResponse::resultCode).isEqualTo(403)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -224,7 +230,10 @@ class BitlyTest {
|
||||||
}.build()
|
}.build()
|
||||||
bl.update(config)
|
bl.update(config)
|
||||||
|
|
||||||
assertThat(bl.lastCallResponse).prop(CallResponse::isUnprocessableEntity).isTrue()
|
assertThat(bl.lastCallResponse).all {
|
||||||
|
prop(CallResponse::isUnprocessableEntity).isTrue()
|
||||||
|
prop(CallResponse::resultCode).isEqualTo(422)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue