updated tests
This commit is contained in:
@@ -74,9 +74,8 @@ class Game {
|
||||
),
|
||||
description = json['description'],
|
||||
color = AppColor.values.firstWhere(
|
||||
(value) =>
|
||||
value.name == json['color'] || value.toString() == json['color'],
|
||||
orElse: () => AppColor.blue,
|
||||
(e) => e.name == json['color'],
|
||||
orElse: () => AppColor.orange,
|
||||
),
|
||||
icon = json['icon'];
|
||||
|
||||
|
||||
@@ -72,9 +72,8 @@ class Team {
|
||||
name = json['name'],
|
||||
createdAt = DateTime.parse(json['createdAt']),
|
||||
color = AppColor.values.firstWhere(
|
||||
(value) =>
|
||||
value.name == json['color'] || value.toString() == json['color'],
|
||||
orElse: () => AppColor.blue,
|
||||
(e) => e.name == json['color'],
|
||||
orElse: () => AppColor.orange,
|
||||
),
|
||||
score = json['score'] ?? 0,
|
||||
members = []; // Populated during import via DataTransferService
|
||||
|
||||
@@ -671,7 +671,7 @@ void main() {
|
||||
'name': testTeam.name,
|
||||
'memberIds': [testPlayer1.id],
|
||||
'createdAt': testTeam.createdAt.toIso8601String(),
|
||||
'color': testTeam.color.toString(),
|
||||
'color': testTeam.color.name,
|
||||
'score': testTeam.score,
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user