Skip to content

Commit

Permalink
deletedBookarksIDs unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
Monirzadeh committed Sep 24, 2024
1 parent 01cb7ef commit e16ea20
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions internal/database/database_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -550,4 +550,13 @@ func testSync(t *testing.T, db DB) {
assert.Equal(t, booksAfterSpecificDate[0].ID, 2)
assert.Len(t, booksAfterSpecificDate, 1)
})

t.Run("get deleted bookmarks id", func(t *testing.T) {
deletedBookarksIDs, err := db.GetDeletedBookmarks(ctx, GetBookmarksOptions{
IsDeleted: []int{1, 5, 10},
})
assert.NoError(t, err, "Get deleted bookmarks must not fail")
assert.Equal(t, deletedBookarksIDs, []int{5, 10})
assert.Len(t, deletedBookarksIDs, 2)
})
}

0 comments on commit e16ea20

Please sign in to comment.