Update test cases

This commit is contained in:
thomashii@dukefirehawk.com 2021-05-06 12:04:22 +08:00
parent 35ea05bdef
commit 6c8decd77c
2 changed files with 4 additions and 3 deletions

View file

@ -37,7 +37,7 @@
* Migrated angel_orm_generator to 4.0.0 (0/0 tests passed)
* Migrated angel_migration_runner to 3.0.0 (0/0 tests passed)
* Migrated angel_orm_test to 3.0.0 (0/0 tests passed)
* Migrated angel_orm_postgres to 3.0.0 (46/54 tests passed)
* Migrated angel_orm_postgres to 3.0.0 (48/54 tests passed)
* Update orm-sdk-2.12.x boilerplate (in progress) <= Milestone 2

View file

@ -134,7 +134,8 @@ manyToManyTests(FutureOr<QueryExecutor> Function() createExecutor,
..email = 'Nelson';
var userOpt = await userQuery.insert(executor);
expect(userOpt.isPresent, true);
userOpt.ifPresent((user) async {
if (userOpt.isPresent) {
var user = userOpt.value;
expect(user.roles, isEmpty);
// Fetch again, just to be doubly sure.
@ -144,6 +145,6 @@ manyToManyTests(FutureOr<QueryExecutor> Function() createExecutor,
fetchedOpt.ifPresent((fetched) {
expect(fetched.roles, isEmpty);
});
});
}
});
}