-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
311 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 9 additions & 8 deletions
17
src/test/kotlin/fi/mkouhia/solidabis/bullshit/ApplicationTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
package fi.mkouhia.solidabis.bullshit | ||
|
||
import io.kotlintest.specs.AnnotationSpec | ||
import io.kotlintest.matchers.string.shouldHaveMinLength | ||
import io.kotlintest.shouldBe | ||
import io.kotlintest.specs.StringSpec | ||
import io.ktor.http.HttpMethod | ||
import io.ktor.http.HttpStatusCode | ||
import io.ktor.server.testing.handleRequest | ||
import io.ktor.server.testing.withTestApplication | ||
import kotlin.test.assertEquals | ||
|
||
class ApplicationTest: AnnotationSpec() { | ||
@Test | ||
fun testRoot() { | ||
class ApplicationTest: StringSpec({ | ||
|
||
"Request at / should return something" { | ||
withTestApplication({ module() }) { | ||
handleRequest(HttpMethod.Get, "/").apply { | ||
assertEquals(HttpStatusCode.OK, response.status()) | ||
assertEquals("HELLO WORLD!", response.content) | ||
response.status() shouldBe HttpStatusCode.OK | ||
response.content shouldHaveMinLength 1 | ||
} | ||
} | ||
} | ||
} | ||
}) |
106 changes: 86 additions & 20 deletions
106
src/test/kotlin/fi/mkouhia/solidabis/bullshit/BullshitConnectionTest.kt
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.