|
7 | 7 | clearSearchHistory, |
8 | 8 | listSearchHistory, |
9 | 9 | recordSearchHistory, |
10 | | - removeSearchHistorySource, |
11 | 10 | } from '@/lib/knowledge/application/search-history' |
12 | 11 | import { SEARCH_HISTORY_LIMIT } from '@/lib/knowledge/search/history/limits' |
13 | 12 |
|
@@ -62,32 +61,6 @@ afterAll(async () => { |
62 | 61 | }) |
63 | 62 |
|
64 | 63 | describe('private search navigation history', () => { |
65 | | - it('removes one source for the person who asked and no one else', async () => { |
66 | | - const colleague = { kind: 'session', userId: userIds[1], sessionId: 'history-test' } as const |
67 | | - const other = { ...source, url: 'https://docs.google.com/document/d/other-fixture' } |
68 | | - for (const viewed of [source, other]) { |
69 | | - await recordSearchHistory.execute({ |
70 | | - principal, |
71 | | - input: { ...input, event: { kind: 'source', source: viewed } }, |
72 | | - }) |
73 | | - } |
74 | | - await recordSearchHistory.execute({ |
75 | | - principal: colleague, |
76 | | - input: { ...input, event: { kind: 'source', source } }, |
77 | | - }) |
78 | | - |
79 | | - await removeSearchHistorySource.execute({ principal, input: { ...input, url: source.url } }) |
80 | | - |
81 | | - expect( |
82 | | - (await listSearchHistory.execute({ principal, input })).sources.map((item) => item.url) |
83 | | - ).toEqual([other.url]) |
84 | | - expect( |
85 | | - (await listSearchHistory.execute({ principal: colleague, input })).sources.map( |
86 | | - (item) => item.url |
87 | | - ) |
88 | | - ).toEqual([source.url]) |
89 | | - }) |
90 | | - |
91 | 64 | it('isolates users and organizations and revokes access with membership', async () => { |
92 | 65 | await recordSearchHistory.execute({ |
93 | 66 | principal, |
|
0 commit comments