add twist to test "Content-Type: ...; utf-8" use case
authorHenry Story <henry.story@bblfish.net>
Fri, 01 Jun 2012 23:35:44 +0200
changeset 226 21cbae5c990c
parent 225 a6bbafc980cb
child 227 179151ae16b0
add twist to test "Content-Type: ...; utf-8" use case
src/test/scala/auth/CreateWebIDSpec.scala
src/test/scala/util/utiltest.scala
--- a/src/test/scala/auth/CreateWebIDSpec.scala	Fri Jun 01 22:59:50 2012 +0200
+++ b/src/test/scala/auth/CreateWebIDSpec.scala	Fri Jun 01 23:35:44 2012 +0200
@@ -189,7 +189,7 @@
        )
 
        val httpCode = Http(
-         webidProfile.secure.postSPARQL(updateQStr) get_statusCode )
+         webidProfile.secure.post(updateQStr,Post.SPARQL+" ; charset=UTF-8") get_statusCode )
         httpCode must_== 200
      }
 
--- a/src/test/scala/util/utiltest.scala	Fri Jun 01 22:59:50 2012 +0200
+++ b/src/test/scala/util/utiltest.scala	Fri Jun 01 23:35:44 2012 +0200
@@ -49,7 +49,7 @@
     def postSPARQL(body: String): Request =
       post(body, Post.SPARQL)
       
-    private def post(body: String, contentType: String): Request =
+   def post(body: String, contentType: String): Request =
       (req <:< Map("Content-Type" -> contentType) <<< body).copy(method="POST")