From 2cf7c27cbe76ab1fe138367e734bdb3efdc0e405 Mon Sep 17 00:00:00 2001 From: Kathleen Tuite Date: Tue, 12 Sep 2023 17:47:06 -0700 Subject: [PATCH] Test of returning 404 if accessing unpublished dataset/entity list (#974) --- test/integration/api/datasets.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/integration/api/datasets.js b/test/integration/api/datasets.js index d3b3eb1e2..106808f81 100644 --- a/test/integration/api/datasets.js +++ b/test/integration/api/datasets.js @@ -621,6 +621,15 @@ describe('datasets and entities', () => { })); + it('should reject if dataset is not published', testService((service) => + service.login('alice', (asAlice) => + asAlice.post('/v1/projects/1/forms') + .send(testData.forms.simpleEntity) + .set('Content-Type', 'application/xml') + .expect(200) + .then(() => asAlice.get('/v1/projects/1/datasets/people') + .expect(404))))); + it('should not return duplicate linkedForms', testService(async (service) => { const asAlice = await service.login('alice');