diff options
author | zachdriver <zach@driver.xyz> | 2017-11-01 10:23:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-01 10:23:25 -0700 |
commit | d480ea203d836739534fd8d27005a1e0a168c30f (patch) | |
tree | a444fbafefccf232e68e72b3f592cd3e0bca3396 /src/test/scala/xyz/driver/core/rest/RestTest.scala | |
parent | 0cb06d70bd91e1e6a4ab9d97851ef9db7aaedfd6 (diff) | |
parent | 595d199f5e41c8e48131cec98b23452bc7ed6ef1 (diff) | |
download | driver-core-d480ea203d836739534fd8d27005a1e0a168c30f.tar.gz driver-core-d480ea203d836739534fd8d27005a1e0a168c30f.tar.bz2 driver-core-d480ea203d836739534fd8d27005a1e0a168c30f.zip |
Add DriverRoute trait and APIError types
Diffstat (limited to 'src/test/scala/xyz/driver/core/rest/RestTest.scala')
-rw-r--r-- | src/test/scala/xyz/driver/core/rest/RestTest.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/scala/xyz/driver/core/rest/RestTest.scala b/src/test/scala/xyz/driver/core/rest/RestTest.scala new file mode 100644 index 0000000..2c3fb7f --- /dev/null +++ b/src/test/scala/xyz/driver/core/rest/RestTest.scala @@ -0,0 +1,15 @@ +package xyz.driver.core.rest + +import akka.util.ByteString +import org.scalatest.{FlatSpec, Matchers} + +class RestTest extends FlatSpec with Matchers { + "`escapeScriptTags` function" should "escap script tags properly" in { + val dirtyString = "</sc----</sc----</sc" + val cleanString = "--------------------" + + (escapeScriptTags(ByteString(dirtyString)).utf8String) should be(dirtyString.replace("</sc", "< /sc")) + + (escapeScriptTags(ByteString(cleanString)).utf8String) should be(cleanString) + } +} |