aboutsummaryrefslogtreecommitdiff
path: root/juick-server
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-03-21 11:55:52 +0300
committerGravatar Vitaly Takmazov2018-03-21 11:55:52 +0300
commitf066f48e4cabd0d7649af2e8c1f4b6a7dea56673 (patch)
treef096a8cc8d0bcd7582ebc2b65d51257d630fcf4e /juick-server
parentc56aa2e1e475fa482dbfa6d44e927fbb12459a8c (diff)
fix tests
Diffstat (limited to 'juick-server')
-rw-r--r--juick-server/src/main/java/com/juick/server/XMPPBot.java2
-rw-r--r--juick-server/src/test/java/com/juick/server/tests/ServerTests.java14
2 files changed, 1 insertions, 15 deletions
diff --git a/juick-server/src/main/java/com/juick/server/XMPPBot.java b/juick-server/src/main/java/com/juick/server/XMPPBot.java
index 38f3ed45..ac1c4121 100644
--- a/juick-server/src/main/java/com/juick/server/XMPPBot.java
+++ b/juick-server/src/main/java/com/juick/server/XMPPBot.java
@@ -670,7 +670,7 @@ public class XMPPBot implements StanzaListener, AutoCloseable {
return "This is not your reply";
}
}
- @UserCommand(pattern = "(^(D L|DL|D LAST)$", help = "D L - Delete last message", patternFlags = Pattern.CASE_INSENSITIVE)
+ @UserCommand(pattern = "^(D L|DL|D LAST)$", help = "D L - Delete last message", patternFlags = Pattern.CASE_INSENSITIVE)
public String commandDeleteLast(User user, Jid from, String... args) {
return "Temporarily unavailable";
}
diff --git a/juick-server/src/test/java/com/juick/server/tests/ServerTests.java b/juick-server/src/test/java/com/juick/server/tests/ServerTests.java
index 9b985543..dac0be22 100644
--- a/juick-server/src/test/java/com/juick/server/tests/ServerTests.java
+++ b/juick-server/src/test/java/com/juick/server/tests/ServerTests.java
@@ -34,19 +34,12 @@ import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
-import org.springframework.boot.web.servlet.server.ServletWebServerFactory;
import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.test.context.TestPropertySource;
@@ -55,16 +48,11 @@ import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.MvcResult;
import org.springframework.web.context.WebApplicationContext;
-import org.springframework.web.socket.WebSocketSession;
-import org.springframework.web.socket.client.WebSocketConnectionManager;
-import org.springframework.web.socket.client.standard.StandardWebSocketClient;
-import org.springframework.web.socket.handler.TextWebSocketHandler;
import org.springframework.web.util.UriComponents;
import org.springframework.web.util.UriComponentsBuilder;
import rocks.xmpp.addr.Jid;
import rocks.xmpp.core.stanza.model.Stanza;
import rocks.xmpp.core.stanza.model.server.ServerMessage;
-import sun.java2d.SurfaceDataProxy;
import javax.inject.Inject;
import java.lang.reflect.InvocationTargetException;
@@ -73,8 +61,6 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
import java.util.stream.IntStream;
import static org.hamcrest.MatcherAssert.assertThat;