moxxy/test/file_metadata_test.dart
Alexander "PapaTutuWawa 2a25cd44cf fix(service): Fix invalid hashes being sent with stickers
Fixes #273.

Also fixes:
- Weird (wrong) serialization of the hash maps
- An issue with migrations when passing a const list

NOTE: If you ran Moxxy between the merge of #267 and this commit, you
have to remove Moxxy's data and start anew.
2023-05-16 01:07:40 +02:00

19 lines
431 B
Dart

import 'package:moxxmpp/moxxmpp.dart';
import 'package:moxxyv2/shared/models/file_metadata.dart';
import 'package:test/test.dart';
void main() {
test('Test serializing and deserializing hash maps', () {
final map = {
HashFunction.sha256: 'hash1',
HashFunction.sha512: 'hash2',
HashFunction.blake2b512: 'hash3',
};
expect(
deserializeHashMap(serializeHashMap(map)),
map,
);
});
}