diff --git a/akka-http-tests/src/test/scala/akka/http/scaladsl/marshalling/ContentNegotiationSpec.scala b/akka-http-tests/src/test/scala/akka/http/scaladsl/marshalling/ContentNegotiationSpec.scala index 649e45df5e..8fe3d5faad 100644 --- a/akka-http-tests/src/test/scala/akka/http/scaladsl/marshalling/ContentNegotiationSpec.scala +++ b/akka-http-tests/src/test/scala/akka/http/scaladsl/marshalling/ContentNegotiationSpec.scala @@ -96,6 +96,11 @@ class ContentNegotiationSpec extends FreeSpec with Matchers { accept(`text/plain` withCharset `UTF-16`) should reject } + "Accept-Charset: *;q=0.1" test { accept ⇒ + accept(`text/plain`) should select(`text/plain` withCharset `UTF-8`) + accept(`image/gif`) should select(`image/gif`) + } + "Accept-Charset: us;q=0.1,*;q=0" test { accept ⇒ accept(`text/plain`) should select(`text/plain` withCharset `US-ASCII`) accept(`text/plain` withCharset `UTF-8`) should reject @@ -171,4 +176,5 @@ class ContentNegotiationSpec extends FreeSpec with Matchers { testHeaders(headers: _*)(accept ⇒ body(accept)) } } -} \ No newline at end of file +} +