aboutsummaryrefslogtreecommitdiff
path: root/server/test
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-08-08 12:05:43 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-08-08 12:05:43 +0100
commit4a11cb6875e196297d44553c3f640d7bbb25256c (patch)
tree2fbb34d94f9c8e861f006a4cb9a7aa067ec41bc7 /server/test
parenta42d3883f110831440f2d85977e9251c4a22541a (diff)
downloadspacebeans-4a11cb6875e196297d44553c3f640d7bbb25256c.tar.gz
spacebeans-4a11cb6875e196297d44553c3f640d7bbb25256c.zip
Formattting
Diffstat (limited to 'server/test')
-rw-r--r--server/test/src/ServerSpec.scala2
-rw-r--r--server/test/src/URIUtilsSpec.scala4
-rw-r--r--server/test/src/handlers/GeminiHandlerSpec.scala12
-rw-r--r--server/test/src/handlers/ProtocolHandlerSpec.scala8
4 files changed, 11 insertions, 15 deletions
diff --git a/server/test/src/ServerSpec.scala b/server/test/src/ServerSpec.scala
index cfb613a..800230a 100644
--- a/server/test/src/ServerSpec.scala
+++ b/server/test/src/ServerSpec.scala
@@ -1,8 +1,8 @@
package net.usebox.gemini.server
+import akka.util.ByteString
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers
-import akka.util.ByteString
class ServerSpec extends AnyFlatSpec with Matchers {
diff --git a/server/test/src/URIUtilsSpec.scala b/server/test/src/URIUtilsSpec.scala
index ab00c86..e471e8c 100644
--- a/server/test/src/URIUtilsSpec.scala
+++ b/server/test/src/URIUtilsSpec.scala
@@ -1,10 +1,10 @@
package net.usebox.gemini.server
+import net.usebox.gemini.server.URIUtils._
+
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers
-import URIUtils._
-
class URIUtilsSpec extends AnyFlatSpec with Matchers {
behavior of "validPath"
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)