added more tests to make sure stream update and abandon update the full text search indexes
This commit is contained in:
parent
48a18ff771
commit
e49f24e95f
2 changed files with 15 additions and 1 deletions
|
@ -22,7 +22,7 @@ def fts_action_sql(claims=None, action='insert'):
|
|||
'tags': "(select group_concat(tag, ' ') from tag where tag.claim_hash=claim.claim_hash)"
|
||||
}
|
||||
if action == 'delete':
|
||||
select['search'] = 'delete'
|
||||
select['search'] = '"delete"'
|
||||
|
||||
where, values = "", {}
|
||||
if claims:
|
||||
|
|
|
@ -355,11 +355,25 @@ class ClaimSearchCommand(ClaimTestCase):
|
|||
)
|
||||
|
||||
await self.assertFindsClaims([], text='cheese')
|
||||
await self.assertFindsClaims([claim2], text='autobiography')
|
||||
await self.assertFindsClaims([claim3], text='history')
|
||||
await self.assertFindsClaims([claim4], text='conspiracy')
|
||||
await self.assertFindsClaims([], text='conspiracy AND history')
|
||||
await self.assertFindsClaims([claim4, claim3], text='conspiracy OR history')
|
||||
await self.assertFindsClaims([claim1, claim4, claim2, claim3], text='documentary')
|
||||
await self.assertFindsClaims([claim4, claim1, claim2, claim3], text='satoshi')
|
||||
|
||||
claim2 = await self.stream_update(
|
||||
self.get_claim_id(claim2), clear_tags=True, tags=['cloud'],
|
||||
title="Satoshi Nakamoto Nography",
|
||||
description="I am Satoshi Nakamoto and this is my nography.",
|
||||
)
|
||||
await self.assertFindsClaims([], text='autobiography')
|
||||
await self.assertFindsClaims([claim2], text='cloud')
|
||||
|
||||
await self.stream_abandon(self.get_claim_id(claim2))
|
||||
await self.assertFindsClaims([], text='cloud')
|
||||
|
||||
|
||||
class ChannelCommands(CommandTestCase):
|
||||
|
||||
|
|
Loading…
Reference in a new issue