diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2018-08-25 17:49:39 +0800 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2018-08-25 17:49:39 +0800 |
commit | ece16bb6984f026f3244f8ba9b26a7f6c72fd8bf (patch) | |
tree | df8237cc53188e786f1a802c0b4d89f326154b00 /example | |
parent | 8304925cf035c23ea6314d75de3516223e84ae8d (diff) | |
download | cask-ece16bb6984f026f3244f8ba9b26a7f6c72fd8bf.tar.gz cask-ece16bb6984f026f3244f8ba9b26a7f6c72fd8bf.tar.bz2 cask-ece16bb6984f026f3244f8ba9b26a7f6c72fd8bf.zip |
0.1.50.1.5
Diffstat (limited to 'example')
-rw-r--r-- | example/staticFiles/app/src/StaticFiles.scala | 3 | ||||
-rw-r--r-- | example/staticFiles/app/test/src/ExampleTests.scala | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/example/staticFiles/app/src/StaticFiles.scala b/example/staticFiles/app/src/StaticFiles.scala index e47f0a1..00d1ace 100644 --- a/example/staticFiles/app/src/StaticFiles.scala +++ b/example/staticFiles/app/src/StaticFiles.scala @@ -11,5 +11,8 @@ object StaticFiles extends cask.MainRoutes{ @cask.staticResources("/static/resource") def staticResourceRoutes() = "cask" + @cask.staticResources("/static/resource2") + def staticResourceRoutes2() = "." + initialize() } diff --git a/example/staticFiles/app/test/src/ExampleTests.scala b/example/staticFiles/app/test/src/ExampleTests.scala index c60f443..ab67bcf 100644 --- a/example/staticFiles/app/test/src/ExampleTests.scala +++ b/example/staticFiles/app/test/src/ExampleTests.scala @@ -24,6 +24,11 @@ object ExampleTests extends TestSuite{ requests.get(s"$host/static/resource/example.txt").text() ==> "the quick brown fox jumps over the lazy dog" + + requests.get(s"$host/static/resource2/cask/example.txt").text() ==> + "the quick brown fox jumps over the lazy dog" + + requests.get(s"$host/static/file/../../../build.sc").statusCode ==> 404 } } |