=htp enable tests that were erroneously disabled due to specs2 -> scalatest copy-pasta

This commit is contained in:
Mathias 2014-10-15 14:48:02 +02:00
parent 0033e74cae
commit 3fbe736960
3 changed files with 8 additions and 8 deletions

View file

@ -15,13 +15,13 @@ class DecoderSpec extends WordSpec with CodecSpecSupport {
"A Decoder" should {
"not transform the message if it doesn't contain a Content-Encoding header" in {
val request = HttpRequest(POST, entity = HttpEntity(smallText))
DummyDecoder.decode(request) === request
DummyDecoder.decode(request) shouldEqual request
}
"correctly transform the message if it contains a Content-Encoding header" in {
val request = HttpRequest(POST, entity = HttpEntity(smallText), headers = List(`Content-Encoding`(DummyDecoder.encoding)))
val decoded = DummyDecoder.decode(request)
decoded.headers === Nil
decoded.entity === HttpEntity(dummyDecompress(smallText))
decoded.headers shouldEqual Nil
decoded.entity shouldEqual HttpEntity(dummyDecompress(smallText))
}
}

View file

@ -15,13 +15,13 @@ class EncoderSpec extends WordSpec with CodecSpecSupport {
"An Encoder" should {
"not transform the message if messageFilter returns false" in {
val request = HttpRequest(POST, entity = HttpEntity(smallText.getBytes("UTF8")))
DummyEncoder.encode(request) === request
DummyEncoder.encode(request) shouldEqual request
}
"correctly transform the HttpMessage if messageFilter returns true" in {
val request = HttpRequest(POST, entity = HttpEntity(smallText))
val encoded = DummyEncoder.encode(request)
encoded.headers === List(`Content-Encoding`(DummyEncoder.encoding))
encoded.entity === HttpEntity(dummyCompress(smallText))
encoded.headers shouldEqual List(`Content-Encoding`(DummyEncoder.encoding))
encoded.entity shouldEqual HttpEntity(dummyCompress(smallText))
}
}

View file

@ -151,7 +151,7 @@ class UnmarshallingSpec extends FreeSpec with Matchers with BeforeAndAfterAll {
//
// "reject illegal multipart content" in {
// val Left(MalformedContent(msg, _)) = HttpEntity(`multipart/form-data` withBoundary "XYZABC", "--noboundary--").as[MultipartFormData]
// msg === "Missing start boundary"
// msg shouldEqual "Missing start boundary"
// }
// "reject illegal form-data content" in {
// val Left(MalformedContent(msg, _)) = HttpEntity(`multipart/form-data` withBoundary "XYZABC",
@ -160,7 +160,7 @@ class UnmarshallingSpec extends FreeSpec with Matchers with BeforeAndAfterAll {
// |
// |test@there.com
// |--XYZABC--""".stripMargin).as[MultipartFormData]
// msg === "Illegal multipart/form-data content: unnamed body part (no Content-Disposition header or no 'name' parameter)"
// msg shouldEqual "Illegal multipart/form-data content: unnamed body part (no Content-Disposition header or no 'name' parameter)"
// }
}
}