mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-03 04:40:09 +00:00
Add Transmission/NZBGet and per-client paths and much more
Extend multi-download-client support to include Transmission and NZBGet and introduce per-client custom download paths. Adds protocol mapping and new client types, Transmission/NZBGet integration services, API CRUD and validation changes, UI components/modal updates and live path previews, and manager routing by protocol. Includes DB migrations (download_path on download_history, interactive_search_access on users), schema updates, and related processor/service fixes and tests to ensure backward compatibility and proper path resolution.
This commit is contained in:
@@ -30,13 +30,16 @@ describe('VersionBadge', () => {
|
||||
it('renders semantic version from build-time env var', async () => {
|
||||
process.env.NEXT_PUBLIC_APP_VERSION = '1.0.0';
|
||||
process.env.NEXT_PUBLIC_GIT_COMMIT = 'abcdef1234';
|
||||
const fetchMock = vi.fn();
|
||||
const fetchMock = vi.fn().mockResolvedValue({
|
||||
json: async () => ({ version: '1.0.0' }),
|
||||
});
|
||||
vi.stubGlobal('fetch', fetchMock);
|
||||
|
||||
render(<VersionBadge />);
|
||||
|
||||
expect(await screen.findByText('v1.0.0')).toBeInTheDocument();
|
||||
expect(fetchMock).not.toHaveBeenCalled();
|
||||
// Should not call /api/version since build-time version is available
|
||||
expect(fetchMock).not.toHaveBeenCalledWith('/api/version');
|
||||
});
|
||||
|
||||
it('falls back to API when build-time version is unavailable', async () => {
|
||||
|
||||
Reference in New Issue
Block a user