fix: Review changes

This commit is contained in:
Deven Joshi
2021-04-16 13:41:05 +05:30
parent 834e29c3cc
commit be9c841c8a
12 changed files with 98 additions and 88 deletions
@@ -638,7 +638,6 @@ void main() {
Reaction(
type: 'test',
createdAt: DateTime.now(),
score: 0,
user: User(
id: client.state?.user?.id ?? '',
),
@@ -777,7 +777,7 @@ void main() {
),
);
await client.deleteMessage(Message(id: messageId, text: ''));
await client.deleteMessage(Message(id: messageId));
verify(() => mockDio.delete<String>('/messages/$messageId')).called(1);
});
@@ -5,7 +5,8 @@ import 'package:stream_chat/src/models/action.dart';
void main() {
group('src/models/action', () {
const jsonExample = '''{
const jsonExample = '''
{
"name": "name",
"style": "style",
"text": "text",
@@ -6,7 +6,8 @@ import 'package:test/test.dart';
void main() {
group('src/models/attachment', () {
const jsonExample = '''{
const jsonExample = '''
{
"type": "giphy",
"title": "awesome",
"title_link": "https://giphy.com/gifs/nrkp3-dance-happy-3o7TKnCdBx5cMg0qti",
@@ -44,7 +44,6 @@ void main() {
id: 'id',
cid: 'a:a',
extraData: {'name': 'cool'},
frozen: false,
);
expect(
@@ -5,7 +5,8 @@ import 'package:stream_chat/src/models/device.dart';
void main() {
group('src/models/device', () {
const jsonExample = '''{
const jsonExample = '''
{
"id": "device-id",
"push_provider": "push-provider"
}''';
@@ -8,7 +8,8 @@ import 'package:stream_chat/src/models/user.dart';
void main() {
group('src/models/message', () {
const jsonExample = r'''{
const jsonExample = r'''
{
"id": "4637f7e4-a06b-42db-ba5a-8d8270dd926f",
"text": "https://giphy.com/gifs/the-lion-king-live-action-5zvN79uTGfLMOVfQaA",
"type": "regular",
@@ -103,7 +104,7 @@ void main() {
'https://giphy.com/gifs/the-lion-king-live-action-5zvN79uTGfLMOVfQaA',
silent: false,
attachments: [
Attachment.fromJson({
Attachment.fromJson(const {
'type': 'video',
'author_name': 'GIPHY',
'title': 'The Lion King Disney GIF - Find \u0026 Share on GIPHY',
@@ -123,7 +124,7 @@ void main() {
],
showInChannel: true,
parentId: 'parentId',
extraData: {'hey': 'test'},
extraData: const {'hey': 'test'},
);
expect(