Skip to content

Commit

Permalink
Surface missing readmodel behaviour with a test #85
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Haarhoff committed Nov 5, 2024
1 parent c7600f9 commit 1c5cd83
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tests/read-models/shared-state/get-equipment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 1c5cd83

Please sign in to comment.