From 4a11cb6875e196297d44553c3f640d7bbb25256c Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Tue, 8 Aug 2023 12:05:43 +0100 Subject: Formattting --- server/test/src/ServerSpec.scala | 2 +- server/test/src/URIUtilsSpec.scala | 4 ++-- server/test/src/handlers/GeminiHandlerSpec.scala | 12 ++++-------- server/test/src/handlers/ProtocolHandlerSpec.scala | 8 ++++---- 4 files changed, 11 insertions(+), 15 deletions(-) (limited to 'server/test') 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) -- cgit v1.2.3