Skip to content

Commit 1fceddf

Browse files
committed
added assertion to test, removed un-used variables
1 parent 6cdbaff commit 1fceddf

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

server/src/test/java/dev/findfirst/core/service/TypesenseServiceTest.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package dev.findfirst.core.service;
22

3+
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
34
import static org.junit.jupiter.api.Assertions.assertEquals;
45
import static org.mockito.Mockito.*;
56

@@ -13,8 +14,6 @@
1314
import dev.findfirst.core.repository.jdbc.TypsenseInitializationRepository;
1415

1516
import org.jsoup.nodes.Document;
16-
import org.jsoup.nodes.Element;
17-
import org.junit.jupiter.api.Disabled;
1817
import org.junit.jupiter.api.Test;
1918
import org.junit.jupiter.api.extension.ExtendWith;
2019
import org.mockito.InjectMocks;
@@ -54,9 +53,6 @@ class TypesenseServiceTest {
5453
@Mock
5554
private CollectionResponse collectionResponse;
5655

57-
private static final String FULL_HTML_OUTPUT = "<html><head></head><body><p>test</p></body></html>",
58-
FRAGMENT_HTML_OUTPUT = "<p>test</p>";
59-
6056
@Test
6157
void alreadyInitialized() {
6258
when(typesenseRepo.findByScriptName("init")).thenReturn(new TypesenseInitRecord(1, "init", null, true, new Date()));
@@ -106,7 +102,7 @@ void storeScrapedText() throws Exception {
106102
when(client.collections("bookmark")).thenReturn(collection);
107103
when(collection.documents()).thenReturn(documents);
108104
when(client.collections("bookmark").documents().create(document)).thenReturn(new HashMap<>());
109-
typesense.addText(bkmk, doc);
105+
assertDoesNotThrow(() -> typesense.addText(bkmk, doc));
110106
}
111107

112108
@Test

0 commit comments

Comments
 (0)