Fixed tests
This commit is contained in:
parent
594ddc52ed
commit
ad1544c6ef
1 changed files with 5 additions and 15 deletions
|
@ -261,15 +261,10 @@ class BitlyTest {
|
||||||
.contains("\"tags\":[]")
|
.contains("\"tags\":[]")
|
||||||
|
|
||||||
bl.update(shortUrl, link = longUrl)
|
bl.update(shortUrl, link = longUrl)
|
||||||
assertThat(bl.lastCallResponse).prop(CallResponse::isUnprocessableEntity).isTrue()
|
assertThat(bl.lastCallResponse).prop(CallResponse::isSuccessful).isTrue()
|
||||||
|
|
||||||
|
assertEquals(Constants.FALSE, bl.update("bit.ly/407GjJU", id = "foo"))
|
||||||
|
|
||||||
bl.update("bit.ly/407GjJU", id = "foo")
|
|
||||||
assertThat(bl.lastCallResponse).all {
|
|
||||||
prop(CallResponse::isForbidden).isTrue()
|
|
||||||
prop(CallResponse::statusCode).isEqualTo(403)
|
|
||||||
prop(CallResponse::message).isEqualTo("FORBIDDEN")
|
|
||||||
prop(CallResponse::description).contains("forbidden")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -295,14 +290,9 @@ class BitlyTest {
|
||||||
bitlink(shortUrl)
|
bitlink(shortUrl)
|
||||||
link(longUrl)
|
link(longUrl)
|
||||||
}.build()
|
}.build()
|
||||||
bl.update(config)
|
|
||||||
|
|
||||||
assertThat(bl.lastCallResponse).all {
|
assertEquals(Constants.TRUE, bl.update(config))
|
||||||
prop(CallResponse::isUnprocessableEntity).isTrue()
|
|
||||||
prop(CallResponse::statusCode).isEqualTo(422)
|
|
||||||
prop(CallResponse::message).isEqualTo("UNPROCESSABLE_ENTITY")
|
|
||||||
prop(CallResponse::description).contains("JSON")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue