From 0eefdb5be9bb082181b7e7bbbc2edd350552b812 Mon Sep 17 00:00:00 2001 From: Ry Racherbaumer Date: Thu, 26 Oct 2023 16:27:11 -0500 Subject: [PATCH] test: update test to confirm ordering --- test/Contacts.test.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/Contacts.test.ts b/test/Contacts.test.ts index 5c3335dbf..c19839d0b 100644 --- a/test/Contacts.test.ts +++ b/test/Contacts.test.ts @@ -87,6 +87,18 @@ describe('Contacts', () => { it('should retrieve consent state', async () => { await aliceClient.contacts.block([bob.address]) await aliceClient.contacts.allow([carol.address]) + await aliceClient.contacts.allow([bob.address]) + await aliceClient.contacts.block([carol.address]) + await aliceClient.contacts.block([bob.address]) + await aliceClient.contacts.allow([carol.address]) + + expect(aliceClient.contacts.consentState(bob.address)).toBe('blocked') + expect(aliceClient.contacts.isAllowed(bob.address)).toBe(false) + expect(aliceClient.contacts.isBlocked(bob.address)).toBe(true) + + expect(aliceClient.contacts.consentState(carol.address)).toBe('allowed') + expect(aliceClient.contacts.isAllowed(carol.address)).toBe(true) + expect(aliceClient.contacts.isBlocked(carol.address)).toBe(false) aliceClient = await Client.create(alice, { env: 'local',