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:
@@ -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');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user