|
|
|
|
@ -96,7 +96,7 @@ final class ServerDataTests: XCTestCase { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
let tournament = Tournament(event: eventId, name: "RG Homme", startDate: Date(), endDate: nil, creationDate: Date(), isPrivate: false, groupStageFormat: MatchFormat.megaTie, roundFormat: MatchFormat.nineGames, loserRoundFormat: MatchFormat.nineGamesDecisivePoint, groupStageSortMode: GroupStageOrderingMode.snake, groupStageCount: 2, rankSourceDate: Date(), dayDuration: 5, teamCount: 3, teamSorting: TeamSortingType.rank, federalCategory: TournamentCategory.mix, federalLevelCategory: TournamentLevel.p1000, federalAgeCategory: FederalTournamentAge.a45, closedRegistrationDate: Date(), groupStageAdditionalQualified: 4, courtCount: 9, prioritizeClubMembers: true, qualifiedPerGroupStage: 1, teamsPerGroupStage: 2, entryFee: 30.0, additionalEstimationDuration: 5, isDeleted: true, publishTeams: true, publishSummons: true, publishGroupStages: true, publishBrackets: true, shouldVerifyBracket: true, shouldVerifyGroupStage: true) |
|
|
|
|
let tournament = Tournament(event: eventId, name: "RG Homme", startDate: Date(), endDate: nil, creationDate: Date(), isPrivate: false, groupStageFormat: MatchFormat.megaTie, roundFormat: MatchFormat.nineGames, loserRoundFormat: MatchFormat.nineGamesDecisivePoint, groupStageSortMode: GroupStageOrderingMode.snake, groupStageCount: 2, rankSourceDate: Date(), dayDuration: 5, teamCount: 3, teamSorting: TeamSortingType.rank, federalCategory: TournamentCategory.mix, federalLevelCategory: TournamentLevel.p1000, federalAgeCategory: FederalTournamentAge.a45, closedRegistrationDate: Date(), groupStageAdditionalQualified: 4, courtCount: 9, prioritizeClubMembers: true, qualifiedPerGroupStage: 1, teamsPerGroupStage: 2, entryFee: 30.0, additionalEstimationDuration: 5, isDeleted: true, publishTeams: true, publishSummons: true, publishGroupStages: true, publishBrackets: true, shouldVerifyBracket: true, shouldVerifyGroupStage: true, hideTeamsWeight: false) |
|
|
|
|
let t = try await Store.main.service().post(tournament) |
|
|
|
|
|
|
|
|
|
assert(t.event == tournament.event) |
|
|
|
|
@ -132,6 +132,7 @@ final class ServerDataTests: XCTestCase { |
|
|
|
|
assert(t.publishBrackets == tournament.publishBrackets) |
|
|
|
|
assert(t.shouldVerifyBracket == tournament.shouldVerifyBracket) |
|
|
|
|
assert(t.shouldVerifyGroupStage == tournament.shouldVerifyGroupStage) |
|
|
|
|
assert(t.hideTeamsWeight == tournament.hideTeamsWeight) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func testGroupStage() async throws { |
|
|
|
|
|