Added more tests

This commit is contained in:
Erik C. Thauvin 2023-01-29 18:30:51 -08:00
parent 708869deb1
commit 725ea3b23b

View file

@ -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