feat(push_notifications): issue-660, fix: issue-908

This commit is contained in:
misha
2026-10-14 08:16:20 +03:00
parent 98c175df44
commit dcd343e765
29 changed files with 2281 additions and 608 deletions

View File

@@ -0,0 +1,26 @@
import 'package:eatvio_app/core/utils/url_utils.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
const baseUrl = 'https://dev2.eatvio.com';
test('keeps an absolute default avatar url unchanged', () {
const avatar =
'https://ui-avatars.dev2.eatvio.com/api/?name=%D0%9A+%D0%90&color=7F9CF5&background=EBF4FF';
expect(joinBaseUrl(baseUrl, avatar), avatar);
});
test('keeps an absolute http url unchanged', () {
const photo = 'http://localhost/storage/avatar.jpg';
expect(joinBaseUrl(baseUrl, photo), photo);
});
test('prefixes a relative storage path with the base url', () {
expect(
joinBaseUrl(baseUrl, '/storage/profile-photos/photo.jpg'),
'https://dev2.eatvio.com/storage/profile-photos/photo.jpg',
);
});
}