Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Rzeszutek committed Jan 26, 2021
1 parent c3bfb99 commit d56d116
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class SqlSanitizerTest extends Specification {
def query = sb.toString()

expect:
def sanitizedQuery = query.replace('=123', '=?').substring(0, SqlSanitizer.LIMIT)
def sanitizedQuery = query.replace('=123', '=?').substring(0, AutoSqlSanitizer.LIMIT)
SqlSanitizer.sanitize(query) == new SqlStatementInfo(sanitizedQuery, "SELECT", "table")
}

Expand Down Expand Up @@ -171,7 +171,7 @@ class SqlSanitizerTest extends Specification {
for (int i = 0; i < 10000; i++) {
s += String.valueOf(i)
}
assert s.substring(0, SqlSanitizer.LIMIT) == SqlSanitizer.sanitize(s).getFullStatement()
assert s.substring(0, AutoSqlSanitizer.LIMIT) == SqlSanitizer.sanitize(s).getFullStatement()
}

def "test 32k truncation"() {
Expand All @@ -182,7 +182,7 @@ class SqlSanitizerTest extends Specification {
}
String sanitized = SqlSanitizer.sanitize(s.toString()).getFullStatement()
System.out.println(sanitized.length())
assert sanitized.length() <= SqlSanitizer.LIMIT
assert sanitized.length() <= AutoSqlSanitizer.LIMIT
assert !sanitized.contains("1234")
}

Expand Down

0 comments on commit d56d116

Please sign in to comment.