Skip to content

Commit c4fe79e

Browse files
committed
Use ids instead of contents for identifying deleted note
1 parent 2a459d7 commit c4fe79e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/content/4/fi/osa4b.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -790,8 +790,8 @@ test('a note can be deleted', async () => {
790790

791791
const notesAtEnd = await helper.notesInDb()
792792

793-
const contents = notesAtEnd.map(n => n.content)
794-
assert(!contents.includes(noteToDelete.content))
793+
const ids = notesAtEnd.map(n => n.id)
794+
assert(!ids.includes(noteToDelete.id))
795795

796796
assert.strictEqual(notesAtEnd.length, helper.initialNotes.length - 1)
797797
})
@@ -1082,8 +1082,8 @@ describe('when there is initially some notes saved', () => {
10821082

10831083
const notesAtEnd = await helper.notesInDb()
10841084

1085-
const contents = notesAtEnd.map(n => n.content)
1086-
assert(!contents.includes(noteToDelete.content))
1085+
const ids = notesAtEnd.map(n => n.id)
1086+
assert(!ids.includes(noteToDelete.id))
10871087

10881088
assert.strictEqual(notesAtEnd.length, helper.initialNotes.length - 1)
10891089
})

0 commit comments

Comments
 (0)