|
1 | 1 | package dev.findfirst.core.service; |
2 | 2 |
|
| 3 | +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; |
3 | 4 | import static org.junit.jupiter.api.Assertions.assertEquals; |
4 | 5 | import static org.mockito.Mockito.*; |
5 | 6 |
|
|
13 | 14 | import dev.findfirst.core.repository.jdbc.TypsenseInitializationRepository; |
14 | 15 |
|
15 | 16 | import org.jsoup.nodes.Document; |
16 | | -import org.jsoup.nodes.Element; |
17 | | -import org.junit.jupiter.api.Disabled; |
18 | 17 | import org.junit.jupiter.api.Test; |
19 | 18 | import org.junit.jupiter.api.extension.ExtendWith; |
20 | 19 | import org.mockito.InjectMocks; |
@@ -54,9 +53,6 @@ class TypesenseServiceTest { |
54 | 53 | @Mock |
55 | 54 | private CollectionResponse collectionResponse; |
56 | 55 |
|
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 | | - |
60 | 56 | @Test |
61 | 57 | void alreadyInitialized() { |
62 | 58 | when(typesenseRepo.findByScriptName("init")).thenReturn(new TypesenseInitRecord(1, "init", null, true, new Date())); |
@@ -106,7 +102,7 @@ void storeScrapedText() throws Exception { |
106 | 102 | when(client.collections("bookmark")).thenReturn(collection); |
107 | 103 | when(collection.documents()).thenReturn(documents); |
108 | 104 | when(client.collections("bookmark").documents().create(document)).thenReturn(new HashMap<>()); |
109 | | - typesense.addText(bkmk, doc); |
| 105 | + assertDoesNotThrow(() -> typesense.addText(bkmk, doc)); |
110 | 106 | } |
111 | 107 |
|
112 | 108 | @Test |
|
0 commit comments