diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-08-08 12:05:43 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-08-08 12:05:43 +0100 |
commit | 4a11cb6875e196297d44553c3f640d7bbb25256c (patch) | |
tree | 2fbb34d94f9c8e861f006a4cb9a7aa067ec41bc7 /server/test/src/handlers | |
parent | a42d3883f110831440f2d85977e9251c4a22541a (diff) | |
download | spacebeans-4a11cb6875e196297d44553c3f640d7bbb25256c.tar.gz spacebeans-4a11cb6875e196297d44553c3f640d7bbb25256c.zip |
Formattting
Diffstat (limited to 'server/test/src/handlers')
-rw-r--r-- | server/test/src/handlers/GeminiHandlerSpec.scala | 12 | ||||
-rw-r--r-- | server/test/src/handlers/ProtocolHandlerSpec.scala | 8 |
2 files changed, 8 insertions, 12 deletions
diff --git a/server/test/src/handlers/GeminiHandlerSpec.scala b/server/test/src/handlers/GeminiHandlerSpec.scala index 158042c..8704db1 100644 --- a/server/test/src/handlers/GeminiHandlerSpec.scala +++ b/server/test/src/handlers/GeminiHandlerSpec.scala @@ -2,11 +2,11 @@ package net.usebox.gemini.server.handlers import java.net.URI +import net.usebox.gemini.server._ + import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers -import net.usebox.gemini.server._ - class GeminiHandlerSpec extends AnyFlatSpec with Matchers { val handler = new GeminiHandler(TestData.conf) @@ -87,9 +87,7 @@ class GeminiHandlerSpec extends AnyFlatSpec with Matchers { it should "include gemini params for gemini MIME type" in { handleWith( new GeminiHandler( - TestData.conf.copy(virtualHosts = - List(TestData.conf.virtualHosts(0).copy(geminiParams = Some("test"))) - ) + TestData.conf.copy(virtualHosts = List(TestData.conf.virtualHosts(0).copy(geminiParams = Some("test")))) ), "gemini://localhost/index.gmi" ) should matchPattern { @@ -188,9 +186,7 @@ class GeminiHandlerSpec extends AnyFlatSpec with Matchers { it should "return not found if directory listing is not enabled and no index" in { handleWith( new GeminiHandler( - TestData.conf.copy(virtualHosts = - List(TestData.conf.virtualHosts(0).copy(directoryListing = false)) - ) + TestData.conf.copy(virtualHosts = List(TestData.conf.virtualHosts(0).copy(directoryListing = false))) ), "gemini://localhost/dir/" ) should be(a[NotFound]) diff --git a/server/test/src/handlers/ProtocolHandlerSpec.scala b/server/test/src/handlers/ProtocolHandlerSpec.scala index d35c9f2..31b0700 100644 --- a/server/test/src/handlers/ProtocolHandlerSpec.scala +++ b/server/test/src/handlers/ProtocolHandlerSpec.scala @@ -1,14 +1,14 @@ package net.usebox.gemini.server.handlers -import java.nio.file.FileSystems import java.net.URI +import java.nio.file.FileSystems + +import net.usebox.gemini.server.{Response, ServiceConf} +import net.usebox.gemini.server.TestData import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers -import net.usebox.gemini.server.{ServiceConf, Response} -import net.usebox.gemini.server.TestData - class ProtocolHandlerSpec extends AnyFlatSpec with Matchers { def getPath(value: String) = FileSystems.getDefault().getPath(value) |