Refactoring
This commit is contained in:
@@ -211,7 +211,7 @@ void main() {
|
||||
const newName = 'New name';
|
||||
await database.groupDao.updateGroupName(
|
||||
groupId: testGroup1.id,
|
||||
newName: newName,
|
||||
name: newName,
|
||||
);
|
||||
|
||||
final result = await database.groupDao.getGroupById(
|
||||
@@ -223,7 +223,7 @@ void main() {
|
||||
test('updateGroupName() returns false for non-existent group', () async {
|
||||
final updated = await database.groupDao.updateGroupName(
|
||||
groupId: 'non-existent-id',
|
||||
newName: 'New name',
|
||||
name: 'New name',
|
||||
);
|
||||
expect(updated, isFalse);
|
||||
});
|
||||
@@ -234,7 +234,7 @@ void main() {
|
||||
const newDescription = 'New description';
|
||||
final updated = await database.groupDao.updateGroupDescription(
|
||||
groupId: testGroup1.id,
|
||||
newDescription: newDescription,
|
||||
description: newDescription,
|
||||
);
|
||||
expect(updated, isTrue);
|
||||
|
||||
@@ -249,7 +249,7 @@ void main() {
|
||||
() async {
|
||||
final updated = await database.groupDao.updateGroupDescription(
|
||||
groupId: 'non-existent-id',
|
||||
newDescription: 'New description',
|
||||
description: 'New description',
|
||||
);
|
||||
expect(updated, isFalse);
|
||||
},
|
||||
@@ -262,11 +262,11 @@ void main() {
|
||||
|
||||
await database.groupDao.updateGroupName(
|
||||
groupId: testGroup1.id,
|
||||
newName: newName,
|
||||
name: newName,
|
||||
);
|
||||
await database.groupDao.updateGroupDescription(
|
||||
groupId: testGroup1.id,
|
||||
newDescription: newDescription,
|
||||
description: newDescription,
|
||||
);
|
||||
|
||||
final updatedGroup = await database.groupDao.getGroupById(
|
||||
|
||||
@@ -268,7 +268,7 @@ void main() {
|
||||
const newName = 'New name';
|
||||
await database.matchDao.updateMatchName(
|
||||
matchId: testMatch1.id,
|
||||
newName: newName,
|
||||
name: newName,
|
||||
);
|
||||
|
||||
final fetchedMatch = await database.matchDao.getMatchById(
|
||||
@@ -280,7 +280,7 @@ void main() {
|
||||
test('updateMatchName() does nothing for non-existent match', () async {
|
||||
final updated = await database.matchDao.updateMatchName(
|
||||
matchId: 'non-existing-id',
|
||||
newName: 'New Name',
|
||||
name: 'New Name',
|
||||
);
|
||||
expect(updated, isFalse);
|
||||
|
||||
@@ -294,7 +294,7 @@ void main() {
|
||||
|
||||
await database.matchDao.updateMatchGroup(
|
||||
matchId: testMatch1.id,
|
||||
newGroupId: testGroup2.id,
|
||||
groupId: testGroup2.id,
|
||||
);
|
||||
|
||||
final fetchedMatch = await database.matchDao.getMatchById(
|
||||
@@ -306,7 +306,7 @@ void main() {
|
||||
test('updateMatchGroup() does nothing for non-existent match', () async {
|
||||
final updated = await database.matchDao.updateMatchGroup(
|
||||
matchId: 'non-existing-id',
|
||||
newGroupId: 'group-id',
|
||||
groupId: 'group-id',
|
||||
);
|
||||
expect(updated, isFalse);
|
||||
|
||||
@@ -362,7 +362,7 @@ void main() {
|
||||
const newName = 'New name';
|
||||
await database.matchDao.updateMatchName(
|
||||
matchId: testMatch1.id,
|
||||
newName: newName,
|
||||
name: newName,
|
||||
);
|
||||
|
||||
final fetchedMatch = await database.matchDao.getMatchById(
|
||||
|
||||
@@ -263,7 +263,7 @@ void main() {
|
||||
const newName = 'New name';
|
||||
await database.teamDao.updateTeamName(
|
||||
teamId: testTeam1.id,
|
||||
newName: newName,
|
||||
name: newName,
|
||||
);
|
||||
|
||||
fetchedTeam = await database.teamDao.getTeamById(teamId: testTeam1.id);
|
||||
@@ -273,7 +273,7 @@ void main() {
|
||||
test('updateTeamName() does nothing for non-existent team', () async {
|
||||
final updated = await database.teamDao.updateTeamName(
|
||||
teamId: 'non-existing-id',
|
||||
newName: 'New Name',
|
||||
name: 'New Name',
|
||||
);
|
||||
expect(updated, isFalse);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user