test: additional test for parsing enum field with @SerializableField(serializer: ..., deserializer: ...)
This commit is contained in:
parent
966622ed2f
commit
0d969aa7f9
1 changed files with 13 additions and 0 deletions
13
packages/orm/angel_orm_test/lib/src/enum_test.dart
Normal file
13
packages/orm/angel_orm_test/lib/src/enum_test.dart
Normal file
|
@ -0,0 +1,13 @@
|
|||
import 'package:angel3_orm_test/src/models/has_car.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() async {
|
||||
|
||||
/// See https://github.com/dukefirehawk/angel/pull/98
|
||||
test('enum field with custom deserializer should be parsed consistently', () {
|
||||
final query = HasCarQuery();
|
||||
final hasCar = query.parseRow([null, null, null, 'R', null]).value;
|
||||
expect(hasCar.color, equals(Color.red));
|
||||
});
|
||||
|
||||
}
|
Loading…
Reference in a new issue