Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jrodriguezs2020 committed Jan 14, 2025
1 parent dc5de18 commit 8c410bc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,7 @@ public void init() throws Exception {
subjectRepository.save(s9);

RepositoryDocument newRepo = new RepositoryDocument(d1.getId(), s1.getId());
RepositoryDocument newRepo2 = new RepositoryDocument(d2.getId(), s2.getId());

repodocumentRepository.save(newRepo);
repodocumentRepository.save(newRepo2);

Document dt1 = new Document("Tema 1", "Prueba", s1, newRepo.getId(), ".pdf");
Document dt2 = new Document("Tema 2", "Prueba", s1, newRepo.getId(), ".pdf");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,13 @@ public ResponseEntity<Document> apiTest(@RequestBody MultipartFile file, @PathVa
}
Long subjectId = subject.get().getId();

System.out.println("----------------------------------------");
System.out.println("----------------------------------------");
System.out.println(subjectId);
System.out.println(degreeId);
System.out.println("----------------------------------------");
System.out.println("----------------------------------------");

if (file == null || degreeId == null || subject == null) {
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
}
Expand All @@ -295,6 +302,13 @@ public ResponseEntity<Document> apiTest(@RequestBody MultipartFile file, @PathVa

public ResponseEntity<Document> saveDocumentLogic(MultipartFile file, Degree degree, Subject subject) {

System.out.println("----------------------------------------");
System.out.println("----------------------------------------");
System.out.println(subject.getId());
System.out.println(degree.getId());
System.out.println("----------------------------------------");
System.out.println("----------------------------------------");

String path = "RepositoryDocuments/" + degree.getName() + "/" + subject.getName();
RepositoryDocument repository = getRepository(degree.getId(), subject.getId(), path);
if (repository == null) {
Expand Down

0 comments on commit 8c410bc

Please sign in to comment.