mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 05:37:32 +00:00
fix(server): unsplash path mapping (#9159)
This commit is contained in:
@@ -40,6 +40,7 @@ import {
|
||||
MockCopilotTestProvider,
|
||||
sse2array,
|
||||
textToEventStream,
|
||||
unsplashSearch,
|
||||
} from './utils/copilot';
|
||||
|
||||
const test = ava as TestFn<{
|
||||
@@ -62,6 +63,7 @@ test.beforeEach(async t => {
|
||||
fal: {
|
||||
apiKey: '1',
|
||||
},
|
||||
unsplashKey: process.env.UNSPLASH_ACCESS_KEY || '1',
|
||||
},
|
||||
},
|
||||
}),
|
||||
@@ -645,3 +647,10 @@ test('should reject request that user have not permission', async t => {
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
test('should be able to search image from unsplash', async t => {
|
||||
const { app } = t.context;
|
||||
|
||||
const resp = await unsplashSearch(app, token);
|
||||
t.not(resp.status, 404, 'route should be exists');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user