aboutsummaryrefslogtreecommitdiffstats
path: root/scalding/src/test/scala
diff options
context:
space:
mode:
Diffstat (limited to 'scalding/src/test/scala')
-rw-r--r--scalding/src/test/scala/sandcrawler/ScorableTest.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/scalding/src/test/scala/sandcrawler/ScorableTest.scala b/scalding/src/test/scala/sandcrawler/ScorableTest.scala
index f63bef8..2094543 100644
--- a/scalding/src/test/scala/sandcrawler/ScorableTest.scala
+++ b/scalding/src/test/scala/sandcrawler/ScorableTest.scala
@@ -70,4 +70,12 @@ class ScorableTest extends FlatSpec with Matchers {
new ReduceFeatures(JsonString), new ReduceFeatures(JsonString))
score shouldBe Scorable.MaxScore
}
+
+ "computeOutput()" should "be case-insensitive" in {
+ val left = JsonString.replace("<<TITLE>>", "A TITLE UPPER CASE")
+ val right = JsonString.replace("<<TITLE>>", "a title upper case")
+ val score = Scorable.computeSimilarity(
+ new ReduceFeatures(left), new ReduceFeatures(right))
+ score shouldBe Scorable.MaxScore
+ }
}