TF-3260 Fix unit test to build CI success

Signed-off-by: dab246 <tdvu@linagora.com>

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
dab246
2025-02-18 17:30:54 +07:00
committed by Dat H. Pham
parent bbb98a2a49
commit 30997a2d7e
10 changed files with 22 additions and 10 deletions
@@ -52,5 +52,17 @@ void main() {
final result = servicePath.usingBaseUrl('');
expect(result.path, '/');
});
test('Should correctly handle baseUrl with port', () {
final servicePath = ServicePath('/api/v1/resource');
final result = servicePath.usingBaseUrl('https://example.com:8080');
expect(result.path, 'https://example.com:8080/api/v1/resource');
});
test('Should correctly handle baseUrl with port and trailing slash', () {
final servicePath = ServicePath('/api/v1/resource');
final result = servicePath.usingBaseUrl('https://example.com:8080/');
expect(result.path, 'https://example.com:8080/api/v1/resource');
});
});
}
@@ -125,7 +125,7 @@ const fallbackGenerators = {
MockSpec<UpdateAccountCacheInteractor>(),
MockSpec<EmailReceiveManager>(),
MockSpec<DownloadController>(fallbackGenerators: fallbackGenerators),
MockSpec<AppGridDashboardController>(),
MockSpec<AppGridDashboardController>(fallbackGenerators: fallbackGenerators),
MockSpec<SpamReportController>(fallbackGenerators: fallbackGenerators),
MockSpec<NetworkConnectionController>(fallbackGenerators: fallbackGenerators),
MockSpec<RemoveEmailDraftsInteractor>(),