File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
openbas-api/src/test/java/io/openbas/rest Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 41
41
class DocumentApiTest extends IntegrationTest {
42
42
43
43
@ Resource protected ObjectMapper mapper ;
44
+
45
+ @ Autowired private MockMvc mvc ;
46
+
44
47
@ Autowired DocumentComposer documentComposer ;
45
48
@ Autowired ChallengeComposer challengeComposer ;
46
49
@ Autowired PayloadComposer payloadComposer ;
@@ -141,4 +144,18 @@ void givenDocumentShouldFetchRelatedEntities() throws Exception {
141
144
assertThatJson (response ).when (IGNORING_ARRAY_ORDER ).isEqualTo (relationJson );
142
145
}
143
146
}
147
+
148
+ private Document getDocumentWithChallenge () {
149
+
150
+ ChallengeComposer .Composer challenge =
151
+ challengeComposer .forChallenge (ChallengeFixture .createDefaultChallenge ());
152
+
153
+ BinaryFile badCoffeeFileContent = FileFixture .getBadCoffeeFileContent ();
154
+ return documentComposer
155
+ .forDocument (DocumentFixture .getDocument (badCoffeeFileContent ))
156
+ .withInMemoryFile (badCoffeeFileContent )
157
+ .withChallenge (challenge )
158
+ .persist ()
159
+ .get ();
160
+ }
144
161
}
You can’t perform that action at this time.
0 commit comments