Created
January 29, 2013 04:12
-
-
Save jkyamog/4661729 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Document Controller" should { | |
"create a document" in new WithApplication(FakeApplication(additionalConfiguration = additionalConfig)) { | |
val json = Json.obj("title" -> "Hello Bob", | |
"description" -> "description") | |
val result = DocumentController.createDocument(FakeRequest("POST", "/documents", FakeHeaders(), json)) | |
status(result) must equalTo(OK) | |
} | |
"list documents" in new WithApplication(FakeApplication(additionalConfiguration = additionalConfig)) { | |
val docs = DocumentController.listDocuments (FakeRequest()) | |
status(docs) must equalTo(OK) | |
contentAsString(docs) must contain("Hello Bob") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
problem stack trace
[error] ! list documents
[error] TimeoutException: Futures timed out after 10000 milliseconds
[error] play.api.libs.concurrent.PlayPromise.await(Promise.scala:134)
[error] play.api.libs.concurrent.PlayPromise.await(Promise.scala:126)
[error] play.api.test.Helpers$.status(Helpers.scala:136)
[error] controllers.DocumentControllerTest$$anonfun$3$$anonfun$apply$4$$anon$2$$anonfun$2.apply$mcI$sp(DocumentControllerTest.scala:35)
[error] controllers.DocumentControllerTest$$anonfun$3$$anonfun$apply$4$$anon$2$$anonfun$2.apply(DocumentControllerTest.scala:35)
[error] controllers.DocumentControllerTest$$anonfun$3$$anonfun$apply$4$$anon$2$$anonfun$2.apply(DocumentControllerTest.scala:35)
[error] controllers.DocumentControllerTest$$anonfun$3$$anonfun$apply$4$$anon$2$delayedInit$body.apply(DocumentControllerTest.scala:35)
[error] play.api.test.WithApplication$$anonfun$around$1.apply(Specs.scala:20)
[error] play.api.test.WithApplication$$anonfun$around$1.apply(Specs.scala:20)
[error] play.api.test.Helpers$.running(Helpers.scala:40)
[error] play.api.test.WithApplication.around(Specs.scala:20)
[error] play.api.test.WithApplication.delayedInit(Specs.scala:17)
[error] controllers.DocumentControllerTest$$anonfun$3$$anonfun$apply$4$$anon$2.(DocumentControllerTest.scala:32)
[error] controllers.DocumentControllerTest$$anonfun$3$$anonfun$apply$4.apply(DocumentControllerTest.scala:32)
[error] controllers.DocumentControllerTest$$anonfun$3$$anonfun$apply$4.apply(DocumentControllerTest.scala:32)