From a608baeed738894433aacfa041e2617f60ce959f Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sat, 4 Apr 2020 01:15:01 +0300 Subject: Initialize all components from configuration --- src/test/java/com/juick/server/tests/ServerTests.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/test/java/com/juick/server/tests') diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java index 80c8fe4e..51e17ecc 100644 --- a/src/test/java/com/juick/server/tests/ServerTests.java +++ b/src/test/java/com/juick/server/tests/ServerTests.java @@ -29,7 +29,9 @@ import com.gargoylesoftware.htmlunit.html.DomElement; import com.gargoylesoftware.htmlunit.html.HtmlPage; import com.github.scribejava.apis.AppleClientSecretGenerator; import com.jayway.jsonpath.JsonPath; -import com.juick.formatters.PlainTextFormatter; +import com.juick.*; +import com.juick.util.*; +import com.juick.util.formatters.PlainTextFormatter; import com.juick.model.*; import com.juick.server.*; import com.juick.www.api.SystemActivity; @@ -41,15 +43,11 @@ import com.juick.www.api.activity.model.objects.Note; import com.juick.www.api.activity.model.objects.Person; import com.juick.www.api.webfinger.model.Account; import com.juick.www.api.xnodeinfo2.model.NodeInfo; -import com.juick.server.util.HttpUtils; -import com.juick.server.util.ImageUtils; import com.juick.www.WebApp; import com.juick.service.*; import com.juick.service.activities.UpdateEvent; import com.juick.service.component.SystemEvent; import com.juick.test.util.MockUtils; -import com.juick.util.DateFormattersHolder; -import com.juick.util.MessageUtils; import com.mitchellbosecke.pebble.PebbleEngine; import com.mitchellbosecke.pebble.error.PebbleException; import com.mitchellbosecke.pebble.template.PebbleTemplate; @@ -1782,7 +1780,7 @@ public class ServerTests { @Test public void escapeSqlTests() { - String sql = String.format("SELECT * FROM table WHERE data='%s'", Utils.encodeSphinx("';-- DROP TABLE table")); + String sql = String.format("SELECT * FROM table WHERE data='%s'", WebUtils.encodeSphinx("';-- DROP TABLE table")); assertThat(sql, is("SELECT * FROM table WHERE data='\\';-- DROP TABLE table\'")); } -- cgit v1.2.3