From 805db1a0fcdda358e7b72868061ff81f3ff64508 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Sun, 26 Nov 2023 13:07:02 +0100 Subject: [PATCH] test(nextcloud): Ensure versions for version checks are parsed correctly Signed-off-by: jld3103 --- packages/nextcloud/test/core_test.dart | 2 ++ packages/nextcloud/test/news_test.dart | 2 ++ packages/nextcloud/test/notes_test.dart | 2 ++ packages/nextcloud/test/spreed_test.dart | 2 ++ 4 files changed, 8 insertions(+) diff --git a/packages/nextcloud/test/core_test.dart b/packages/nextcloud/test/core_test.dart index b4248d35..86c17154 100644 --- a/packages/nextcloud/test/core_test.dart +++ b/packages/nextcloud/test/core_test.dart @@ -23,6 +23,8 @@ void main() { expect(() => response.headers, isA()); final result = client.core.getVersionCheck(response.body.ocs.data); + expect(result.versions, isNotNull); + expect(result.versions, isNotEmpty); expect(result.isSupported, isTrue); }); diff --git a/packages/nextcloud/test/news_test.dart b/packages/nextcloud/test/news_test.dart index 567c2d0c..6e73b2a4 100644 --- a/packages/nextcloud/test/news_test.dart +++ b/packages/nextcloud/test/news_test.dart @@ -30,6 +30,8 @@ void main() { test('Is supported', () async { final result = await client.news.getVersionCheck(); + expect(result.versions, isNotNull); + expect(result.versions, isNotEmpty); expect(result.isSupported, isTrue); }); diff --git a/packages/nextcloud/test/notes_test.dart b/packages/nextcloud/test/notes_test.dart index a0dad4ab..795bd521 100644 --- a/packages/nextcloud/test/notes_test.dart +++ b/packages/nextcloud/test/notes_test.dart @@ -23,6 +23,8 @@ void main() { expect(() => response.headers, isA()); final result = client.notes.getVersionCheck(response.body.ocs.data); + expect(result.versions, isNotNull); + expect(result.versions, isNotEmpty); expect(result.isSupported, isTrue); }); diff --git a/packages/nextcloud/test/spreed_test.dart b/packages/nextcloud/test/spreed_test.dart index 84ad5773..b1774301 100644 --- a/packages/nextcloud/test/spreed_test.dart +++ b/packages/nextcloud/test/spreed_test.dart @@ -35,6 +35,8 @@ void main() { expect(() => response.headers, isA()); final result = client1.spreed.getVersionCheck(response.body.ocs.data); + expect(result.versions, isNotNull); + expect(result.versions, isNotEmpty); expect(result.isSupported, isTrue); });