fix tests
This commit is contained in:
@@ -223,7 +223,10 @@ void main() {
|
||||
final mockDio = MockDio();
|
||||
final mockUploader = MockAttachmentUploader();
|
||||
|
||||
const file = AttachmentFile(path: 'filePath/fileName.pdf');
|
||||
const file = AttachmentFile(
|
||||
path: 'filePath/fileName.pdf',
|
||||
size: 100,
|
||||
);
|
||||
const channelId = 'testId';
|
||||
const channelType = 'messaging';
|
||||
|
||||
@@ -262,7 +265,10 @@ void main() {
|
||||
final mockDio = MockDio();
|
||||
final mockUploader = MockAttachmentUploader();
|
||||
|
||||
const image = AttachmentFile(path: 'imagePath/imageName.jpeg');
|
||||
const image = AttachmentFile(
|
||||
path: 'imagePath/imageName.jpeg',
|
||||
size: 100,
|
||||
);
|
||||
const channelId = 'testId';
|
||||
const channelType = 'messaging';
|
||||
|
||||
|
||||
@@ -861,10 +861,10 @@ void main() {
|
||||
DateTime.parse('2019-04-03T18:43:33.213374Z'));
|
||||
expect(channelState.channel?.createdBy, isA<User>());
|
||||
expect(channelState.channel?.frozen, true);
|
||||
expect(channelState.channel?.extraData!['example'], 1);
|
||||
expect(channelState.channel?.extraData!['name'], '#dev');
|
||||
expect(channelState.channel?.extraData['example'], 1);
|
||||
expect(channelState.channel?.extraData['name'], '#dev');
|
||||
expect(
|
||||
channelState.channel?.extraData!['image'],
|
||||
channelState.channel?.extraData['image'],
|
||||
'https://cdn.chrisshort.net/testing-certificate-chains-in-go/GOPHER_MIC_DROP.png',
|
||||
);
|
||||
expect(channelState.messages, hasLength(25));
|
||||
|
||||
@@ -20,8 +20,8 @@ void main() {
|
||||
expect(channel.id, equals('test'));
|
||||
expect(channel.type, equals('livestream'));
|
||||
expect(channel.cid, equals('livestream:test'));
|
||||
expect(channel.extraData!['cats'], equals(true));
|
||||
expect(channel.extraData!['fruit'], equals(['bananas', 'apples']));
|
||||
expect(channel.extraData['cats'], equals(true));
|
||||
expect(channel.extraData['fruit'], equals(['bananas', 'apples']));
|
||||
});
|
||||
|
||||
test('should serialize to json correctly', () {
|
||||
|
||||
Reference in New Issue
Block a user