Skip to content

Commit 74f3585

Browse files
committed
more stubs
1 parent 86e378e commit 74f3585

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/realtime_client/test/socket_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,9 +393,8 @@ void main() {
393393
mockedSink = MockWebSocketSink();
394394

395395
when(() => mockedSocketChannel.sink).thenReturn(mockedSink);
396+
when(() => mockedSocketChannel.ready).thenAnswer((_) => Future.value());
396397
when(() => mockedSink.close()).thenAnswer((_) => Future.value());
397-
when(() => mockedSink.close(any(), any()))
398-
.thenAnswer((_) => Future.value());
399398
});
400399

401400
test('sends data to connection when connected', () {
@@ -410,7 +409,7 @@ void main() {
410409
.called(1);
411410
});
412411

413-
test('buffers data when not connected', () {
412+
test('buffers data when not connected', () async {
414413
mockedSocket.connect();
415414
mockedSocket.connState = SocketStates.connecting;
416415

@@ -579,6 +578,7 @@ void main() {
579578

580579
when(() => mockedSocketChannel.sink).thenReturn(mockedSink);
581580
when(() => mockedSink.close()).thenAnswer((_) => Future.value());
581+
when(() => mockedSocketChannel.ready).thenAnswer((_) => Future.value());
582582

583583
mockedSocket.connect();
584584
});

0 commit comments

Comments
 (0)