-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1973 from reportportal/merge-hotfix/5.11.1
Merge hotfix/5.11.1
- Loading branch information
Showing
14 changed files
with
91 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,18 +39,22 @@ | |
import org.junit.jupiter.api.extension.ExtendWith; | ||
import org.mockito.InjectMocks; | ||
import org.mockito.Mock; | ||
import org.mockito.Spy; | ||
import org.mockito.junit.jupiter.MockitoExtension; | ||
import org.springframework.data.domain.PageRequest; | ||
import org.springframework.test.context.TestPropertySource; | ||
|
||
/** | ||
* @author <a href="mailto:[email protected]">Ihar Kahadouski</a> | ||
*/ | ||
@ExtendWith(MockitoExtension.class) | ||
@TestPropertySource(properties = {"rp.environment.variable.user.suggestions=true"}) | ||
class GetProjectHandlerImplTest { | ||
|
||
@Mock | ||
private ProjectRepository projectRepository; | ||
|
||
@Spy | ||
@InjectMocks | ||
private GetProjectHandlerImpl handler; | ||
|
||
|
@@ -124,17 +128,11 @@ void getUserNamesByIncorrectTerm() { | |
); | ||
} | ||
|
||
@Test | ||
void getUserNamesNegative() { | ||
ReportPortalException exception = assertThrows( | ||
ReportPortalException.class, () -> handler.getUserNames("", | ||
new ReportPortalUser.ProjectDetails(1L, "superadmin_personal", | ||
ProjectRole.PROJECT_MANAGER | ||
), PageRequest.of(0, 10) | ||
)); | ||
assertEquals( | ||
"Incorrect filtering parameters. Length of the filtering string '' is less than 1 symbol", | ||
exception.getMessage() | ||
); | ||
} | ||
@Test | ||
void getUserNamesNegative() { | ||
ReportPortalException exception = assertThrows(ReportPortalException.class, () -> handler.getUserNames("", UserRole.ADMINISTRATOR, | ||
new ReportPortalUser.ProjectDetails(1L, "superadmin_personal", ProjectRole.PROJECT_MANAGER), | ||
PageRequest.of(0, 10))); | ||
assertEquals("Incorrect filtering parameters. Length of the filtering string '' is less than 1 symbol", exception.getMessage()); | ||
} | ||
} |
Oops, something went wrong.