mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 08:25:44 +01:00
Implement option to load rest of files completely
This commit is contained in:
@@ -109,6 +109,18 @@ public class ContentResourceTest {
|
||||
assertEquals("line 2\nline 3\n", baos.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldNotLimitOutputWhenEndLessThanZero() throws Exception {
|
||||
mockContent("file", "line 1\nline 2\nline 3\nline 4".getBytes());
|
||||
|
||||
Response response = contentResource.get(NAMESPACE, REPO_NAME, REV, "file", 1, -1);
|
||||
assertEquals(200, response.getStatus());
|
||||
|
||||
ByteArrayOutputStream baos = readOutputStream(response);
|
||||
|
||||
assertEquals("line 2\nline 3\nline 4", baos.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldHandleMissingFile() {
|
||||
Response response = contentResource.get(NAMESPACE, REPO_NAME, REV, "doesNotExist", null, null);
|
||||
|
||||
Reference in New Issue
Block a user