28 lines
797 B
Dart
28 lines
797 B
Dart
// Author: fruit.com.cn
|
|
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:fruitshorts/core/config/app_config.dart';
|
|
import 'package:fruitshorts/core/legal/legal_page.dart';
|
|
|
|
void main() {
|
|
tearDown(AppConfig.clearRuntimeBaseUrl);
|
|
|
|
test('should_build_language_page_when_locale_is_supported', () {
|
|
AppConfig.applyRuntimeBaseUrl('http://192.168.31.243:8081');
|
|
|
|
expect(
|
|
legalPageUrl(legalPrivacyPath, const Locale('zh')),
|
|
'http://192.168.31.243:8081/privacy/zh',
|
|
);
|
|
expect(
|
|
legalPageUrl(legalTermsPath, const Locale('id')),
|
|
'http://192.168.31.243:8081/terms/id',
|
|
);
|
|
expect(
|
|
legalPageUrl(legalPrivacyPath, const Locale('fr')),
|
|
'http://192.168.31.243:8081/privacy/en',
|
|
);
|
|
});
|
|
}
|