@@ -162,24 +162,23 @@ void main() {
|
||||
|
||||
final mockWSChannel = MockWSChannel();
|
||||
|
||||
final StreamController<String> streamController =
|
||||
StreamController<String>.broadcast();
|
||||
final streamController = StreamController<String>.broadcast();
|
||||
|
||||
final computedUrl =
|
||||
const computedUrl =
|
||||
'wss://baseurl/connect?test=true&json=%7B%22payload%22%3A%22test%22%2C%22user_details%22%3A%7B%22id%22%3A%22testid%22%7D%7D';
|
||||
|
||||
when(connectFunc(computedUrl)).thenAnswer((_) => mockWSChannel);
|
||||
when(mockWSChannel.sink).thenAnswer((_) => MockWSSink());
|
||||
when(mockWSChannel.stream).thenAnswer((_) {
|
||||
return streamController.stream;
|
||||
});
|
||||
when(() => connectFunc(computedUrl)).thenAnswer((_) => mockWSChannel);
|
||||
when(() => mockWSChannel.sink).thenAnswer((_) => MockWSSink());
|
||||
when(() => mockWSChannel.stream).thenAnswer((_) => streamController.stream);
|
||||
|
||||
ws.connect();
|
||||
await ws.disconnect();
|
||||
streamController.add('{}');
|
||||
|
||||
verify(connectFunc(computedUrl)).called(1);
|
||||
verifyNever(handleFunc(any));
|
||||
verify(() => connectFunc(computedUrl)).called(1);
|
||||
verifyNever(() => handleFunc(any()));
|
||||
|
||||
addTearDown(streamController.close);
|
||||
});
|
||||
|
||||
test('should run correctly health check', () async {
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
/Users/salvatoregiordano/fvm/versions/beta
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"flutterSdkVersion": "beta"
|
||||
}
|
||||
@@ -25,11 +25,6 @@ dependencies:
|
||||
sdk: flutter
|
||||
stream_chat_flutter:
|
||||
path: ../
|
||||
stream_chat_persistence:
|
||||
git:
|
||||
url: https://github.com/GetStream/stream-chat-flutter.git
|
||||
ref: develop
|
||||
path: packages/stream_chat_persistence
|
||||
|
||||
# The following adds the Cupertino Icons font to your application.
|
||||
# Use with the CupertinoIcons class for iOS style icons.
|
||||
|
||||
@@ -13,8 +13,7 @@ environment:
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
stream_chat_flutter_core:
|
||||
path: ../stream_chat_flutter_core
|
||||
stream_chat_flutter_core: ^1.5.0
|
||||
photo_view: ^0.11.0
|
||||
rxdart: ^0.26.0
|
||||
scrollable_positioned_list: ^0.1.8
|
||||
@@ -50,6 +49,8 @@ dependencies:
|
||||
|
||||
|
||||
dependency_overrides:
|
||||
stream_chat:
|
||||
path: ../stream_chat
|
||||
stream_chat_flutter_core:
|
||||
path: ../stream_chat_flutter_core
|
||||
|
||||
|
||||
@@ -30,6 +30,10 @@ dependencies:
|
||||
# Use with the CupertinoIcons class for iOS style icons.
|
||||
cupertino_icons: ^1.0.0
|
||||
|
||||
dependency_overrides:
|
||||
stream_chat:
|
||||
path: ../../stream_chat
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
|
||||
@@ -121,7 +121,7 @@ void main() {
|
||||
);
|
||||
|
||||
final errorMessage = 'Error! Error! Error!';
|
||||
final error = DioError(type: DioErrorType.RESPONSE, error: errorMessage);
|
||||
final error = DioError(type: DioErrorType.response, error: errorMessage);
|
||||
when(mockChannel.initialized).thenAnswer((_) => Future.error(error));
|
||||
|
||||
await tester.pumpWidget(
|
||||
|
||||
@@ -11,13 +11,16 @@ dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
cupertino_icons: ^1.0.0
|
||||
stream_chat:
|
||||
path: ../../stream_chat
|
||||
stream_chat_persistence:
|
||||
path: ../
|
||||
|
||||
dependency_overrides:
|
||||
stream_chat:
|
||||
path: ../../stream_chat
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
|
||||
flutter:
|
||||
uses-material-design: true
|
||||
@@ -20,8 +20,7 @@ dependencies:
|
||||
path: ^1.8.0
|
||||
path_provider: ^2.0.0
|
||||
sqlite3_flutter_libs: ^0.4.0+1
|
||||
stream_chat:
|
||||
path: ../stream_chat
|
||||
stream_chat: ^1.5.0
|
||||
|
||||
dependency_overrides:
|
||||
stream_chat:
|
||||
|
||||
Reference in New Issue
Block a user