Merge branch 'develop' into overlay-portal
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:test/test.dart';
|
||||
import 'package:stream_chat/src/core/api/responses.dart';
|
||||
import 'package:stream_chat/src/core/models/device.dart';
|
||||
import 'package:stream_chat/src/core/models/member.dart';
|
||||
@@ -8,6 +7,7 @@ import 'package:stream_chat/src/core/models/message.dart';
|
||||
import 'package:stream_chat/src/core/models/reaction.dart';
|
||||
import 'package:stream_chat/src/core/models/read.dart';
|
||||
import 'package:stream_chat/stream_chat.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
||||
group('src/api/responses', () {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:test/test.dart';
|
||||
import 'package:stream_chat/src/core/models/filter.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
||||
group('operators', () {
|
||||
|
||||
@@ -175,5 +175,26 @@ void main() {
|
||||
expect(newUser.teams, ['team1', 'team2']);
|
||||
expect(newUser.language, 'fr');
|
||||
});
|
||||
|
||||
test(
|
||||
'fromUser should not override name with id if not available in extraData',
|
||||
() {
|
||||
final user = User(id: 'test-id');
|
||||
expect(user.id, 'test-id');
|
||||
expect(user.name, 'test-id');
|
||||
|
||||
final encodedUser = user.toJson();
|
||||
expect(encodedUser['id'], 'test-id');
|
||||
expect(encodedUser['name'], null);
|
||||
|
||||
final ownUser = OwnUser.fromUser(user);
|
||||
expect(user.id, 'test-id');
|
||||
expect(user.name, 'test-id');
|
||||
|
||||
final encodedOwnUser = ownUser.toJson();
|
||||
expect(encodedOwnUser['id'], 'test-id');
|
||||
expect(encodedOwnUser['name'], null);
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:test/test.dart';
|
||||
import 'package:stream_chat/src/core/util/serializer.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
||||
group('src/models/serialization', () {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:test/test.dart';
|
||||
import 'package:stream_chat/src/core/util/extension.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
||||
test('`.withNullifyer` converts the type into non-nullable', () {
|
||||
|
||||
@@ -6,11 +6,11 @@ import 'package:rxdart/rxdart.dart';
|
||||
import 'package:stream_chat/src/core/api/channel_api.dart';
|
||||
import 'package:stream_chat/src/core/api/device_api.dart';
|
||||
import 'package:stream_chat/src/core/api/general_api.dart';
|
||||
import 'package:stream_chat/src/core/api/guest_api.dart';
|
||||
import 'package:stream_chat/src/core/api/message_api.dart';
|
||||
import 'package:stream_chat/src/core/api/moderation_api.dart';
|
||||
import 'package:stream_chat/src/core/api/stream_chat_api.dart';
|
||||
import 'package:stream_chat/src/core/api/user_api.dart';
|
||||
import 'package:stream_chat/src/core/api/guest_api.dart';
|
||||
import 'package:stream_chat/src/core/http/token.dart';
|
||||
import 'package:stream_chat/src/core/http/token_manager.dart';
|
||||
import 'package:stream_chat/src/ws/websocket.dart';
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:mocktail/mocktail.dart';
|
||||
import 'package:stream_chat/src/core/http/token_manager.dart';
|
||||
import 'package:stream_chat/src/ws/websocket.dart';
|
||||
import 'package:stream_chat/stream_chat.dart';
|
||||
import 'package:test/test.dart';
|
||||
import 'package:mocktail/mocktail.dart';
|
||||
import 'package:stream_chat/src/ws/websocket.dart';
|
||||
import 'package:web_socket_channel/web_socket_channel.dart';
|
||||
|
||||
import '../fakes.dart';
|
||||
|
||||
Reference in New Issue
Block a user