Skip to content

Commit

Permalink
fix takedown test ref
Browse files Browse the repository at this point in the history
  • Loading branch information
dholms committed Dec 29, 2023
1 parent 232a4c8 commit 70536aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/bsky/tests/auto-moderator/takedowns.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ describe('takedowner', () => {
.where('uri', '=', post.ref.uriStr)
.select('takedownRef')
.executeTakeFirst()
expect(record?.takedownRef).toEqual(takedownEvent.id.toString())
expect(record?.takedownRef).toEqual(`BSKY-TAKEDOWN-${takedownEvent.id}`)

const recordPds = await network.pds.ctx.actorStore.read(
post.ref.uri.hostname,
Expand All @@ -116,7 +116,7 @@ describe('takedowner', () => {
.select('takedownRef')
.executeTakeFirst(),
)
expect(recordPds?.takedownRef).toEqual(takedownEvent.id.toString())
expect(recordPds?.takedownRef).toEqual(`BSKY-TAKEDOWN-${takedownEvent.id}`)

expect(testInvalidator.invalidated.length).toBe(1)
expect(testInvalidator.invalidated[0].subject).toBe(
Expand Down Expand Up @@ -165,7 +165,7 @@ describe('takedowner', () => {
.where('uri', '=', res.data.uri)
.select('takedownRef')
.executeTakeFirst()
expect(recordBsky?.takedownRef).toEqual(takedownEvent.id.toString())
expect(recordBsky?.takedownRef).toEqual(`BSKY-TAKEDOWN-${takedownEvent.id}`)

const recordPds = await network.pds.ctx.actorStore.read(alice, (store) =>
store.db.db
Expand All @@ -174,7 +174,7 @@ describe('takedowner', () => {
.select('takedownRef')
.executeTakeFirst(),
)
expect(recordPds?.takedownRef).toEqual(takedownEvent.id.toString())
expect(recordPds?.takedownRef).toEqual(`BSKY-TAKEDOWN-${takedownEvent.id}`)

expect(testInvalidator.invalidated.length).toBe(2)
expect(testInvalidator.invalidated[1].subject).toBe(
Expand Down

0 comments on commit 70536aa

Please sign in to comment.