Skip to content

Commit 9497fe9

Browse files
committed
Remove 304 from statuses list.
1 parent aa6b2f7 commit 9497fe9

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/test/kotlin/io/github/nstdio/http/ext/ExtendedHttpClientContract.kt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import io.kotest.property.arbitrary.string
2727
import mockwebserver3.MockResponse
2828
import mockwebserver3.MockWebServer
2929
import org.assertj.core.api.Assertions.assertThat
30-
import org.assertj.core.api.ThrowingConsumer
3130
import org.awaitility.core.ThrowingRunnable
3231
import org.junit.jupiter.api.Disabled
3332
import org.junit.jupiter.api.Test
@@ -148,7 +147,7 @@ interface ExtendedHttpClientContract {
148147
}
149148

150149
@ParameterizedTest
151-
@ValueSource(ints = [201, 202, 205, 207, 226, 302, 303, 304, 305, 306, 307, 308, 400, 401, 402, 403, 406, 407, 408, 409, 411, 412, 413, 415, 416, 417, 418, 421, 422, 423, 424, 425, 426, 428, 429, 431, 451, 500, 502, 503, 504, 505, 506, 507, 508, 510, 511])
150+
@ValueSource(ints = [201, 202, 205, 207, 226, 302, 303, 305, 306, 307, 308, 400, 401, 402, 403, 406, 407, 408, 409, 411, 412, 413, 415, 416, 417, 418, 421, 422, 423, 424, 425, 426, 428, 429, 431, 451, 500, 502, 503, 504, 505, 506, 507, 508, 510, 511])
152151
fun shouldNotCacheStatusCodesOtherThen(statusCode: Int) {
153152
//given
154153
val body = "abc"
@@ -165,10 +164,9 @@ interface ExtendedHttpClientContract {
165164
val r2 = send(requestBuilder().build())
166165

167166
//then
168-
assertThat(listOf(r1, r2)).allSatisfy(
169-
ThrowingConsumer { r: HttpResponse<String> ->
170-
assertThat(r).isNotCached.hasStatusCode(statusCode)
171-
})
167+
assertThat(listOf(r1, r2)).allSatisfy {
168+
assertThat(it).isNotCached.hasStatusCode(statusCode)
169+
}
172170
}
173171

174172
@Test

0 commit comments

Comments
 (0)