fixing formatting: sure is fun
This commit is contained in:
parent
5edcf9ffc8
commit
8403bc0592
@ -39,7 +39,7 @@ public class EntrepreneurApi {
|
|||||||
@RequestBody String content,
|
@RequestBody String content,
|
||||||
@AuthenticationPrincipal Jwt principal) {
|
@AuthenticationPrincipal Jwt principal) {
|
||||||
entrepreneurApiService.editSectionCell(
|
entrepreneurApiService.editSectionCell(
|
||||||
sectionCellId, content, principal.getClaimAsString("email"));
|
sectionCellId, content, principal.getClaimAsString("email"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -52,7 +52,8 @@ public class EntrepreneurApi {
|
|||||||
@DeleteMapping("/entrepreneur/sectionCells/{sectionCellId}")
|
@DeleteMapping("/entrepreneur/sectionCells/{sectionCellId}")
|
||||||
public void removeSectionCell(
|
public void removeSectionCell(
|
||||||
@PathVariable Long sectionCellId, @AuthenticationPrincipal Jwt principal) {
|
@PathVariable Long sectionCellId, @AuthenticationPrincipal Jwt principal) {
|
||||||
entrepreneurApiService.removeSectionCell(sectionCellId, principal.getClaimAsString("email"));
|
entrepreneurApiService.removeSectionCell(
|
||||||
|
sectionCellId, principal.getClaimAsString("email"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -121,9 +121,8 @@ public class SharedApiServiceTest {
|
|||||||
// Assuming staticUnauthorizedMail is an entrepreneur NOT linked to staticAuthorizedProject
|
// Assuming staticUnauthorizedMail is an entrepreneur NOT linked to staticAuthorizedProject
|
||||||
// or staticUnauthorizedProject:
|
// or staticUnauthorizedProject:
|
||||||
when(mockUtilsService.isAllowedToCheckProject(eq(staticUnauthorizedMail), anyLong()))
|
when(mockUtilsService.isAllowedToCheckProject(eq(staticUnauthorizedMail), anyLong()))
|
||||||
.thenReturn(
|
.thenReturn(false); // Unauthorized entrepreneur NOT allowed for ANY project ID by
|
||||||
false); // Unauthorized entrepreneur NOT allowed for ANY project ID by
|
// default
|
||||||
// default
|
|
||||||
|
|
||||||
// Add more specific mock setups here if needed for entrepreneur tests
|
// Add more specific mock setups here if needed for entrepreneur tests
|
||||||
// E.g., If you have a test specifically for an entrepreneur accessing THEIR project:
|
// E.g., If you have a test specifically for an entrepreneur accessing THEIR project:
|
||||||
@ -250,7 +249,7 @@ public class SharedApiServiceTest {
|
|||||||
sharedApiService.getSectionCells(
|
sharedApiService.getSectionCells(
|
||||||
staticAuthorizedProject
|
staticAuthorizedProject
|
||||||
.getIdProject(), // Project static user is not
|
.getIdProject(), // Project static user is not
|
||||||
// authorized for
|
// authorized for
|
||||||
1L,
|
1L,
|
||||||
LocalDateTime.now()
|
LocalDateTime.now()
|
||||||
.format(
|
.format(
|
||||||
@ -626,9 +625,8 @@ public class SharedApiServiceTest {
|
|||||||
cell ->
|
cell ->
|
||||||
projectAppointmentsList.addAll(
|
projectAppointmentsList.addAll(
|
||||||
sectionCellService.getAppointmentsBySectionCellId(
|
sectionCellService.getAppointmentsBySectionCellId(
|
||||||
cell
|
cell.getIdSectionCell()))); // Get appointments for
|
||||||
.getIdSectionCell()))); // Get appointments for
|
// those cells
|
||||||
// those cells
|
|
||||||
|
|
||||||
Optional<Appointment> createdAppointmentOpt =
|
Optional<Appointment> createdAppointmentOpt =
|
||||||
projectAppointmentsList.stream()
|
projectAppointmentsList.stream()
|
||||||
@ -944,9 +942,7 @@ public class SharedApiServiceTest {
|
|||||||
.anyMatch(
|
.anyMatch(
|
||||||
a ->
|
a ->
|
||||||
a.getIdAppointment()
|
a.getIdAppointment()
|
||||||
.equals(
|
.equals(otherApp.getIdAppointment()))); // Ensure
|
||||||
otherApp
|
// appointment from other project is not included
|
||||||
.getIdAppointment()))); // Ensure
|
|
||||||
// appointment from other project is not included
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user