Skip to content

Commit

Permalink
remove invert filter test and fix test output format
Browse files Browse the repository at this point in the history
  • Loading branch information
CollinBeczak committed Apr 9, 2024
1 parent a6b33ee commit 0885461
Showing 1 changed file with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,17 +161,7 @@ class SearchParametersMixinSpec() extends PlaySpec with SearchParametersMixin {
val params = SearchParameters(taskParams = SearchTaskParameters(taskFeatureId = Some("123")))
this
.filterTaskFeatureId(params)
.sql() mustEqual "LOWER(CAST(tasks.name AS TEXT)) LIKE LOWER('123%')"
}

"be inverted" in {
val params = SearchParameters(
taskParams = SearchTaskParameters(taskFeatureId = Some("12345")),
invertFields = Some(List("fid"))
)
this
.filterTaskFeatureId(params)
.sql() mustEqual "NOT LOWER(CAST(tasks.name AS TEXT)) LIKE LOWER('12345%')"
.sql() mustEqual s"LOWER(TRIM(tasks.name::TEXT)) LIKE LOWER('%123%')"
}
}

Expand Down

0 comments on commit 0885461

Please sign in to comment.