mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 15:05:44 +01:00
Git Plugin Config: Adds test for empty config
This commit is contained in:
@@ -87,6 +87,17 @@ public class GitConfigResourceTest {
|
|||||||
assertTrue(responseString.contains("\"update\":{\"href\":\"/v2/config/git"));
|
assertTrue(responseString.contains("\"update\":{\"href\":\"/v2/config/git"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@SubjectAware(username = "readWrite")
|
||||||
|
public void shouldGetGitConfigEvenWhenItsEmpty() throws URISyntaxException, IOException {
|
||||||
|
when(repositoryHandler.getConfig()).thenReturn(null);
|
||||||
|
|
||||||
|
MockHttpResponse response = get();
|
||||||
|
String responseString = response.getContentAsString();
|
||||||
|
|
||||||
|
assertTrue(responseString.contains("\"disabled\":false"));
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@SubjectAware(username = "readOnly")
|
@SubjectAware(username = "readOnly")
|
||||||
public void shouldGetGitConfigWithoutUpdateLink() throws URISyntaxException {
|
public void shouldGetGitConfigWithoutUpdateLink() throws URISyntaxException {
|
||||||
|
|||||||
Reference in New Issue
Block a user