=htp small simplification in tests
This commit is contained in:
parent
9347bf57e7
commit
27c5167e73
2 changed files with 4 additions and 11 deletions
|
|
@ -9,7 +9,7 @@ import scala.concurrent.Await
|
|||
import scala.concurrent.duration._
|
||||
import org.scalatest.{ BeforeAndAfterAll, FreeSpec, Matchers }
|
||||
import akka.actor.ActorSystem
|
||||
import akka.stream.{ FlowMaterializer, MaterializerSettings }
|
||||
import akka.stream.FlowMaterializer
|
||||
import akka.http.util._
|
||||
import akka.http.model._
|
||||
import headers._
|
||||
|
|
@ -18,12 +18,9 @@ import MediaTypes._
|
|||
|
||||
class MarshallingSpec extends FreeSpec with Matchers with BeforeAndAfterAll with MultipartMarshallers {
|
||||
implicit val system = ActorSystem(getClass.getSimpleName)
|
||||
implicit val materializer = FlowMaterializer()
|
||||
import system.dispatcher
|
||||
|
||||
val materializerSettings = MaterializerSettings(system)
|
||||
|
||||
implicit val materializer = FlowMaterializer(materializerSettings)
|
||||
|
||||
"The PredefinedToEntityMarshallers." - {
|
||||
"StringMarshaller should marshal strings to `text/plain` content in UTF-8" in {
|
||||
marshal("Ha“llo") shouldEqual HttpEntity("Ha“llo")
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import org.scalatest.matchers.Matcher
|
|||
import org.scalatest.{ BeforeAndAfterAll, FreeSpec, Matchers }
|
||||
import akka.actor.ActorSystem
|
||||
import akka.stream.scaladsl.Flow
|
||||
import akka.stream.{ FlowMaterializer, MaterializerSettings }
|
||||
import akka.stream.FlowMaterializer
|
||||
import akka.http.model._
|
||||
import akka.http.util._
|
||||
import headers._
|
||||
|
|
@ -20,13 +20,9 @@ import FastFuture._
|
|||
|
||||
class UnmarshallingSpec extends FreeSpec with Matchers with BeforeAndAfterAll {
|
||||
implicit val system = ActorSystem(getClass.getSimpleName)
|
||||
|
||||
implicit val materializer = FlowMaterializer()
|
||||
import system.dispatcher
|
||||
|
||||
val materializerSettings = MaterializerSettings(system)
|
||||
|
||||
implicit val materializer = FlowMaterializer(materializerSettings)
|
||||
|
||||
"The PredefinedFromEntityUnmarshallers." - {
|
||||
"stringUnmarshaller should unmarshal `text/plain` content in UTF-8 to Strings" in {
|
||||
Unmarshal(HttpEntity("Hällö")).to[String] should evaluateTo("Hällö")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue