diff --git a/packages/nextcloud/test/core.dart b/packages/nextcloud/test/core.dart index 12e52c74..bd53f964 100644 --- a/packages/nextcloud/test/core.dart +++ b/packages/nextcloud/test/core.dart @@ -1,3 +1,4 @@ +import 'package:built_collection/built_collection.dart'; import 'package:nextcloud/nextcloud.dart'; import 'package:test/test.dart'; @@ -67,10 +68,10 @@ Future run(final DockerImage image) async { search: '', itemType: 'call', itemId: 'new', - shareTypes: [ + shareTypes: BuiltList([ ShareType.user.code, ShareType.group.code, - ], + ]), ); expect(response.ocs.data, hasLength(3)); diff --git a/packages/nextcloud/test/notes.dart b/packages/nextcloud/test/notes.dart index 9dcd2f2f..a686899c 100644 --- a/packages/nextcloud/test/notes.dart +++ b/packages/nextcloud/test/notes.dart @@ -122,9 +122,10 @@ Future run(final DockerImage image) async { test('Update settings', () async { var response = await client.notes.updateSettings( notesSettings: NextcloudNotesSettings( - notesPath: 'Test Notes', - fileSuffix: '.txt', - noteMode: NextcloudNotesSettings_NoteMode.preview, + (final b) => b + ..notesPath = 'Test Notes' + ..fileSuffix = '.txt' + ..noteMode = NextcloudNotesSettings_NoteMode.preview, ), ); expect(response.notesPath, 'Test Notes'); diff --git a/packages/nextcloud/test/notifications.dart b/packages/nextcloud/test/notifications.dart index e3d3a9fa..414709f1 100644 --- a/packages/nextcloud/test/notifications.dart +++ b/packages/nextcloud/test/notifications.dart @@ -51,9 +51,9 @@ Future run(final DockerImage image) async { expect(response.ocs.data[0].message, '456'); expect(response.ocs.data[0].link, ''); expect(response.ocs.data[0].subjectRich, ''); - expect(response.ocs.data[0].subjectRichParameters, isEmpty); + expect(response.ocs.data[0].subjectRichParameters?.asList, isEmpty); expect(response.ocs.data[0].messageRich, ''); - expect(response.ocs.data[0].messageRichParameters, isEmpty); + expect(response.ocs.data[0].messageRichParameters?.asList, isEmpty); expect(response.ocs.data[0].icon, isNotEmpty); expect(response.ocs.data[0].actions, hasLength(0)); }); @@ -73,9 +73,9 @@ Future run(final DockerImage image) async { expect(response.ocs.data.message, '456'); expect(response.ocs.data.link, ''); expect(response.ocs.data.subjectRich, ''); - expect(response.ocs.data.subjectRichParameters, isEmpty); + expect(response.ocs.data.subjectRichParameters?.asList, isEmpty); expect(response.ocs.data.messageRich, ''); - expect(response.ocs.data.messageRichParameters, isEmpty); + expect(response.ocs.data.messageRichParameters?.asList, isEmpty); expect(response.ocs.data.icon, isNotEmpty); expect(response.ocs.data.actions, hasLength(0)); });