From 61cdeb74dcaf7105e9316228d8b4b63a4c988aa7 Mon Sep 17 00:00:00 2001 From: Enzo Conty Date: Fri, 29 Dec 2023 12:14:56 +0100 Subject: [PATCH] =?UTF-8?q?tests:=20adding=20a=20test=20for=20resolving=20?= =?UTF-8?q?the=20architecture=20=E2=80=99all=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test/packagekit_service_test.dart | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/packages/app_center/test/packagekit_service_test.dart b/packages/app_center/test/packagekit_service_test.dart index d35d61ed1..506ca5ebb 100644 --- a/packages/app_center/test/packagekit_service_test.dart +++ b/packages/app_center/test/packagekit_service_test.dart @@ -159,6 +159,29 @@ void main() { final info = await packageKit.resolve('foo', 'amd64'); expect(info!.packageId.arch, equals('amd64')); }); + + test('architecture \'all\'', () async { + final mockTransaction = createMockPackageKitTransaction( + events: const [ + PackageKitPackageEvent( + info: PackageKitInfo.available, + packageId: PackageKitPackageId( + name: 'foo', + version: '1.0', + arch: 'all', + ), + summary: 'summary', + ), + ], + ); + final mockClient = + createMockPackageKitClient(transaction: mockTransaction); + final packageKit = + PackageKitService(dbus: createMockDbusClient(), client: mockClient); + await packageKit.activateService(); + final info = await packageKit.resolve('foo', 'all'); + expect(info!.packageId.arch, equals('all')); + }); }); test('cancel', () async {