From 1c5cd830570053cf94ae6a105c42d04d96a88db2 Mon Sep 17 00:00:00 2001 From: Daniel Haarhoff Date: Tue, 5 Nov 2024 07:05:16 +0000 Subject: [PATCH] Surface missing readmodel behaviour with a test #85 --- .../read-models/shared-state/get-equipment.test.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/read-models/shared-state/get-equipment.test.ts b/tests/read-models/shared-state/get-equipment.test.ts index 7b73e20..fafa552 100644 --- a/tests/read-models/shared-state/get-equipment.test.ts +++ b/tests/read-models/shared-state/get-equipment.test.ts @@ -33,6 +33,10 @@ describe('get', () => { memberNumber: addTrainerMember.memberNumber, areaId: createArea.id, }; + const removeOwner = { + memberNumber: addOwner.memberNumber, + areaId: addOwner.areaId, + }; const addTrainer = { memberNumber: addTrainerMember.memberNumber, equipmentId: equipmentId, @@ -118,17 +122,19 @@ describe('get', () => { }); }); - describe.skip('when someone was an owner and trainer but is no longer an owner', () => { + describe('when someone was an owner and trainer but is no longer an owner', () => { beforeEach(async () => { await framework.commands.memberNumbers.linkNumberToEmail( addTrainerMember ); await framework.commands.area.create(createArea); await framework.commands.equipment.add(addEquipment); + await framework.commands.area.addOwner(addOwner); await framework.commands.trainers.add(addTrainer); - // await framework.commands.area.removeOwner(removeOwner); + await framework.commands.area.removeOwner(removeOwner); }); - it('returns that they are not an owner', () => { + + it.failing('returns that they are not an owner', () => { const member = pipe( addTrainer.memberNumber, framework.sharedReadModel.members.get, @@ -137,7 +143,7 @@ describe('get', () => { expect(member.ownerOf).toHaveLength(0); }); - it('returns that they are not a trainer', () => { + it.failing('returns that they are not a trainer', () => { const member = pipe( addTrainer.memberNumber, framework.sharedReadModel.members.get,