Skip to content

Commit

Permalink
test: update test to confirm ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
rygine committed Oct 26, 2023
1 parent 4d1407f commit 0eefdb5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/Contacts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 0eefdb5

Please sign in to comment.