From e3c1561f552d6ed58f355950343f8ccf31acea6a Mon Sep 17 00:00:00 2001 From: Tobe O Date: Mon, 22 Oct 2018 19:10:37 -0400 Subject: [PATCH] fixed tests --- CHANGELOG.md | 3 +++ lib/src/client.dart | 1 + pubspec.yaml | 2 +- test/simple_test.dart | 16 +++++++++------- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9906dd3e..2d2e1a6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 2.0.0-alpha.2 +* Explicitly import `package:angel_framework/http.dart`. + # 2.0.0-alpha.1 * Update for compliance with newer `angel_client`. diff --git a/lib/src/client.dart b/lib/src/client.dart index b5dff30f..063baf6b 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -4,6 +4,7 @@ import 'dart:io'; import 'package:angel_client/base_angel_client.dart' as client; import 'package:angel_client/io.dart' as client; import 'package:angel_framework/angel_framework.dart'; +import 'package:angel_framework/http.dart'; import 'package:angel_websocket/io.dart' as client; import 'package:http/http.dart' as http hide StreamedResponse; import 'package:http/src/streamed_response.dart'; diff --git a/pubspec.yaml b/pubspec.yaml index 9a1f3448..5d1ff946 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ author: Tobe O description: Testing utility library for the Angel framework. Use with package:test. homepage: https://github.com/angel-dart/test.git name: angel_test -version: 2.0.0-alpha.1 +version: 2.0.0-alpha.2 dependencies: angel_client: ^2.0.0-alpha angel_framework: ^2.0.0-alpha diff --git a/test/simple_test.dart b/test/simple_test.dart index 09082f2e..c4056e3f 100644 --- a/test/simple_test.dart +++ b/test/simple_test.dart @@ -39,11 +39,12 @@ main() { }) ..use( '/foo', - new AnonymousService( + new AnonymousService>( index: ([params]) async => [ - {'michael': 'jackson'} + {'michael': 'jackson'} ], - create: (data, [params]) async => {'foo': 'bar'})); + create: (data, [params]) async => + {'foo': 'bar'})); var ws = new AngelWebSocket(app); await app.configure(ws.configureServer); @@ -123,23 +124,24 @@ main() { var foo = client.service('foo'); var result = await foo.index(); expect(result, [ - {'michael': 'jackson'} + {'michael': 'jackson'} ]); }); test('index', () async { var foo = client.service('foo'); var result = await foo.create({}); - expect(result, {'foo': 'bar'}); + expect(result, {'foo': 'bar'}); }); }); test('websocket', () async { var ws = await client.websocket(); var foo = ws.service('foo'); - foo.create({}); + foo.create({}); var result = await foo.onCreated.first; - expect(result is Map ? result : result.data, equals({'foo': 'bar'})); + expect(result is Map ? result : result.data, + equals({'foo': 'bar'})); }); }); }