From 5c56beceb1d2af1373b091d8b615fe569b1c43ae Mon Sep 17 00:00:00 2001 From: Jan Romann Date: Wed, 20 Dec 2023 19:36:45 +0100 Subject: [PATCH] fixup! test: add tests for requestThingDescription method --- test/core/discovery_test.dart | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/test/core/discovery_test.dart b/test/core/discovery_test.dart index f60ac94f..ad6780b5 100644 --- a/test/core/discovery_test.dart +++ b/test/core/discovery_test.dart @@ -8,6 +8,7 @@ import 'dart:convert'; import 'package:dart_wot/dart_wot.dart'; import 'package:dart_wot/src/core/content.dart'; +import 'package:dart_wot/src/core/thing_discovery.dart'; import 'package:test/test.dart'; const testUriScheme = 'test'; @@ -28,12 +29,7 @@ const validTestThingDescription = ''' } '''; -const invalidTestTitle = 'Invalid Test TD'; -const invalidTestThingDescription = ''' - { - "title": "$invalidTestTitle", - } -'''; +const invalidTestThingDescription = '"Hi there!"'; void main() { group('Discovery Tests', () { @@ -65,7 +61,7 @@ void main() { await expectLater( wot.requestThingDescription(invalidTestDiscoveryUri), // TODO: Refine error handling - throwsA(isException), + throwsA(isA()), ); }, );