Skip to content

Commit

Permalink
test: remove metadata line and duplicate tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Falx committed Feb 23, 2022
1 parent dffc1f8 commit d9497ea
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions test/unit/storage/DataAccessorBasedStore.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,25 +449,6 @@ describe('A DataAccessorBasedStore', (): void => {
it('can write containers.', async(): Promise<void> => {
const resourceID = { path: `${root}container/` };

// Generate based on URI
representation.metadata.removeAll(RDF.type);
representation.metadata.add(RDF.type, LDP.terms.Container);
representation.metadata.contentType = 'text/turtle';
representation.data = guardedStreamFrom([ `<${root}resource/> a <coolContainer>.` ]);
await expect(store.setRepresentation(resourceID, representation)).resolves.toEqual([
{ path: root },
{ path: `${root}container/` },
]);
expect(accessor.data[resourceID.path]).toBeTruthy();
expect(accessor.data[resourceID.path].metadata.contentType).toBeUndefined();
expect(accessor.data[resourceID.path].metadata.get(DC.terms.modified)?.value).toBe(now.toISOString());
expect(accessor.data[root].metadata.get(DC.terms.modified)?.value).toBe(now.toISOString());
expect(accessor.data[root].metadata.get(GENERATED_PREDICATE)).toBeUndefined();
});

it('can write containers (path ending in slash, but type missing).', async(): Promise<void> => {
const resourceID = { path: `${root}container/` };

// Generate based on URI
representation.metadata.removeAll(RDF.type);
representation.metadata.contentType = 'text/turtle';
Expand Down

0 comments on commit d9497ea

Please sign in to comment.