File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
api/src/test/java/ca/bc/gov/educ/studentdatacollection/api/controller/v1 Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -225,6 +225,7 @@ void testUpdateStudentAndResolveProvDuplicates_typeCHANGE_GRADE_shouldSetDuplica
225
225
sdcSchoolCollectionEntity2 .setSdcDistrictCollectionID (sdcDistrictCollectionID );
226
226
sdcSchoolCollectionRepository .save (sdcSchoolCollectionEntity2 );
227
227
228
+ when (this .restUtils .getAllSchoolTombstones ()).thenReturn (List .of (schoolTombstone1 , schoolTombstone2 ));
228
229
when (this .restUtils .getSchoolBySchoolID (schoolTombstone1 .getSchoolId ())).thenReturn (Optional .of (schoolTombstone1 ));
229
230
when (this .restUtils .getSchoolBySchoolID (schoolTombstone2 .getSchoolId ())).thenReturn (Optional .of (schoolTombstone2 ));
230
231
when (this .restUtils .getGradStatusResult (any (), any ())).thenReturn (GradStatusResult .builder ().build ());
Original file line number Diff line number Diff line change 31
31
32
32
import java .io .FileInputStream ;
33
33
import java .time .LocalDateTime ;
34
- import java .util .Arrays ;
35
- import java .util .Base64 ;
36
- import java .util .Optional ;
37
- import java .util .UUID ;
34
+ import java .util .*;
38
35
39
36
import static ca .bc .gov .educ .studentdatacollection .api .constants .v1 .URL .BASE_URL ;
40
37
import static org .assertj .core .api .Assertions .assertThat ;
@@ -275,6 +272,9 @@ void testProcessSdcFNCharsFile_givenValidPayload_ShouldReturnStatusOk() throws E
275
272
final String fileContents = Base64 .getEncoder ().encodeToString (IOUtils .toByteArray (fis ));
276
273
assertThat (fileContents ).isNotEmpty ();
277
274
val body = SdcFileUpload .builder ().fileContents (fileContents ).createUser ("ABC" ).fileName ("SampleUpload.std" ).build ();
275
+
276
+ when (this .restUtils .getAllSchoolTombstones ()).thenReturn (List .of (school ));
277
+
278
278
this .mockMvc .perform (post (BASE_URL + "/" + sdcSchoolCollection .getSdcSchoolCollectionID ().toString () + "/file" )
279
279
.with (jwt ().jwt (jwt -> jwt .claim ("scope" , "WRITE_SDC_COLLECTION" )))
280
280
.header ("correlationID" , UUID .randomUUID ().toString ())
You can’t perform that action at this time.
0 commit comments