Ensure deleting conversation deletes story replies

This commit is contained in:
Josh Perez 2022-09-29 20:57:11 -04:00 committed by GitHub
parent 00a720faa9
commit 67c706a7ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 219 additions and 163 deletions

View file

@ -1643,11 +1643,12 @@ describe('SQL migrations test', () => {
function insertPredicate(
query: string,
storyId: string | undefined
storyId: string | undefined,
includeStoryReplies: boolean
): string {
return query.replaceAll(
':story_id_predicate:',
_storyIdPredicate(storyId)
_storyIdPredicate(storyId, includeStoryReplies)
);
}
@ -1657,7 +1658,7 @@ describe('SQL migrations test', () => {
for (const storyId of ['123', undefined]) {
for (const { query, index } of queries) {
const details = db
.prepare(insertPredicate(query, storyId))
.prepare(insertPredicate(query, storyId, true))
.all({ storyId })
.map(({ detail }) => detail)
.join('\n');