From 3f8291ece325f987e6f375b3ecaeb8f24eeb20a7 Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Mon, 28 Aug 2023 18:38:26 +0200 Subject: [PATCH] test(neon): test useragent Signed-off-by: Nikolas Rimikis --- packages/neon/neon/test/useragent_test.dart | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 packages/neon/neon/test/useragent_test.dart diff --git a/packages/neon/neon/test/useragent_test.dart b/packages/neon/neon/test/useragent_test.dart new file mode 100644 index 00000000..b4550fa2 --- /dev/null +++ b/packages/neon/neon/test/useragent_test.dart @@ -0,0 +1,17 @@ +import 'package:neon/src/utils/user_agent.dart'; +import 'package:package_info_plus/package_info_plus.dart'; +import 'package:test/test.dart'; + +void main() { + test('UserAgent', () { + final packageInfo = PackageInfo( + appName: 'appName', + packageName: 'packageName', + version: 'version', + buildNumber: 'buildNumber', + ); + buildUserAgent(packageInfo); + + expect(neonUserAgent, 'Neon version+buildNumber'); + }); +}