mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
fix: Remove default root container from InMemoryDataAccessor
This commit is contained in:
parent
6424b07fc6
commit
bb65630441
@ -31,8 +31,7 @@ export class InMemoryDataAccessor implements DataAccessor {
|
||||
|
||||
const metadata = new RepresentationMetadata({ path: this.base });
|
||||
metadata.addQuads(generateResourceQuads(DataFactory.namedNode(this.base), true));
|
||||
const rootContainer = { entries: {}, metadata };
|
||||
this.store = { entries: { '': rootContainer }};
|
||||
this.store = { entries: { }};
|
||||
}
|
||||
|
||||
public async canHandle(): Promise<void> {
|
||||
|
@ -17,6 +17,15 @@ describe('An integrated AuthenticatedLdpHandler', (): void => {
|
||||
'urn:solid-server:default:variable:baseUrl': BASE,
|
||||
},
|
||||
) as HttpHandler;
|
||||
|
||||
// The tests depend on there being a root container here
|
||||
await performRequest(
|
||||
handler,
|
||||
new URL('http://test.com/'),
|
||||
'PUT',
|
||||
{ 'content-type': 'text/turtle', 'transfer-encoding': 'chunked' },
|
||||
[ ],
|
||||
);
|
||||
});
|
||||
|
||||
it('can add, read and delete data based on incoming requests.', async(): Promise<void> => {
|
||||
|
@ -28,9 +28,9 @@ describe('A server with the Solid WebSockets API behind a proxy', (): void => {
|
||||
});
|
||||
});
|
||||
|
||||
it('returns a 200.', async(): Promise<void> => {
|
||||
it('returns a 404 if no data was initialized.', async(): Promise<void> => {
|
||||
const response = await fetch(serverUrl, { headers });
|
||||
expect(response.status).toBe(200);
|
||||
expect(response.status).toBe(404);
|
||||
});
|
||||
|
||||
it('sets the Updates-Via header.', async(): Promise<void> => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user