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