Skip to content

Deposit left around when ingesting something a second time #29

Description

@marcolarosa

If you run the test:

  it.only("Does not increment version number if you add the same thing twice", async function() {
    await repository.createNewObjectContent("xx", makeContent);
    const object = await repository.createNewObjectContent("xx", makeContent);
    const inventory = await object.getInventory();
    assert.strictEqual(inventory.head, "v1");
  });

and then look at the content of the ocfl repo you'll see there are no errors but the deposit folder has been left around:

Screen Shot 2019-10-08 at 12 32 39 pm

If you change the test to (createNewObjectContent 3 times):

  it.only("Does not increment version number if you add the same thing twice", async function() {
    await repository.createNewObjectContent("xx", makeContent);
    await repository.createNewObjectContent("xx", makeContent);
    const object = await repository.createNewObjectContent("xx", makeContent);
    const inventory = await object.getInventory();
    assert.strictEqual(inventory.head, "v1");
  });

You get an error:

Screen Shot 2019-10-08 at 12 35 00 pm

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions