mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
fix: Prevent data from being drained when read
Comments were also added and URI generation takes slash into account
This commit is contained in:
@@ -59,6 +59,13 @@ describe('A SimpleResourceStore', (): void => {
|
||||
await expect(arrayifyStream(result.data)).resolves.toEqualRdfQuadArray([ quad ]);
|
||||
});
|
||||
|
||||
it('can add resources to previously added resources.', async(): Promise<void> => {
|
||||
const identifier = await store.addResource({ path: base }, representation);
|
||||
representation.data = streamifyArray([ quad ]);
|
||||
const childIdentifier = await store.addResource(identifier, representation);
|
||||
expect(childIdentifier.path).toContain(identifier.path);
|
||||
});
|
||||
|
||||
it('can read binary data.', async(): Promise<void> => {
|
||||
const identifier = await store.addResource({ path: base }, representation);
|
||||
expect(identifier.path.startsWith(base)).toBeTruthy();
|
||||
|
||||
Reference in New Issue
Block a user