Skip to content
This repository was archived by the owner on Oct 14, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,17 @@ class DownloadStatsPathTest : BaseTest() {
}
}

@Test
fun badTotalVersionReturnsSaneData() {
runBlocking {
RestAssured.given()
.`when`()
.get("/v3/stats/downloads/total/101")
.then()
.statusCode(400)
}
}

@Test
fun totalTagReturnsSaneData() {
runBlocking {
Expand All @@ -171,6 +182,17 @@ class DownloadStatsPathTest : BaseTest() {
}
}

@Test
fun badTotalTagReturnsSaneData() {
runBlocking {
RestAssured.given()
.`when`()
.get("/v3/stats/downloads/total/101/fooBar")
.then()
.statusCode(400)
}
}

@Test
fun trackingReturnsSaneData() {
runBlocking {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,24 @@ class VersionPathTest {
.statusCode(200)
.body(VersionDataMatcher(parsed))
}

@Test
fun parsesNoVersion() {

RestAssured.given()
.`when`()
.get("/v3/version/")
.then()
.statusCode(404)
}

@Test
fun parsesBadVersion() {

RestAssured.given()
.`when`()
.get("/v3/version/fooBar")
.then()
.statusCode(400)
}
}