Skip to content
Snippets Groups Projects
Commit bb0d34a1 authored by Mike Lynch's avatar Mike Lynch
Browse files

Test for selective inclusion of data payloads - not passing

parent 08594a53
Branches
Tags
No related merge requests found
......@@ -485,6 +485,27 @@ describe("Create catalogs with some or none of the data payloads", () => {
const files = get_type(cj, '@file');
expect(files).to.be.empty;
});
it("can create a catalog with one payload file deselected", async () => {
dp['dataLocations'][0]['selected'] = false;
dp['accessRightsToggle'] = true;
var selected = [];
dp['dataLocations'].forEach((l) => {
//files[l['name']] = l['selected'];
if( l['selected'] ) {
selected.push(l['name']);
}
});
const cj = await make_catalog(dp);
const root = get_root(cj);
const parts = root['hasPart'];
expect(parts).to.equal(selected.map((f) => { return { '@id': f }}));
//const files = get_type(cj, '@file');
//expect(files).to.be.empty;
});
});
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment