Updated clicks summary test to match current API response
This commit is contained in:
parent
e81e7f315a
commit
ba92c1f3b1
2 changed files with 5 additions and 12 deletions
8
examples/bld/src/.idea/workspace.xml
generated
8
examples/bld/src/.idea/workspace.xml
generated
|
@ -1,8 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="PropertiesComponent">{
|
|
||||||
"keyToString": {
|
|
||||||
"settings.editor.selected.configurable": "reference.settings.ide.settings.new.ui"
|
|
||||||
}
|
|
||||||
}</component>
|
|
||||||
</project>
|
|
|
@ -180,12 +180,13 @@ class BitlyTest {
|
||||||
fun `clicks summary`() {
|
fun `clicks summary`() {
|
||||||
val bl = bitly.bitlinks()
|
val bl = bitly.bitlinks()
|
||||||
assertThat(bl.clicks(shortUrl)).isNotEqualTo(Constants.EMPTY)
|
assertThat(bl.clicks(shortUrl)).isNotEqualTo(Constants.EMPTY)
|
||||||
bl.clicks(shortUrl, unit = Units.MONTH, units = 6)
|
val clicks = bl.clicks(shortUrl, unit = Units.MONTH, units = 1)
|
||||||
assertThat(bl.lastCallResponse).all {
|
assertThat(bl.lastCallResponse).all {
|
||||||
prop(CallResponse::isUpgradeRequired)
|
prop(CallResponse::isSuccessful).isTrue()
|
||||||
prop(CallResponse::statusCode).isEqualTo(402)
|
prop(CallResponse::statusCode).isEqualTo(200)
|
||||||
prop(CallResponse::description).startsWith("Metrics")
|
prop(CallResponse::description).isEmpty()
|
||||||
}
|
}
|
||||||
|
assertThat(clicks.toInt()).isGreaterThanOrEqualTo(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue