From a484ed164f4b7d07526349b24178bed5f7af96dd Mon Sep 17 00:00:00 2001 From: Malaber Date: Sun, 12 Apr 2026 17:48:12 +0200 Subject: [PATCH] Fix direct comparison E2E expectation --- spec/e2e/http/tournament_lifecycle_spec.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spec/e2e/http/tournament_lifecycle_spec.rb b/spec/e2e/http/tournament_lifecycle_spec.rb index 39a7e0e..ac8046c 100644 --- a/spec/e2e/http/tournament_lifecycle_spec.rb +++ b/spec/e2e/http/tournament_lifecycle_spec.rb @@ -93,11 +93,14 @@ RSpec.describe 'Tournament lifecycle HTTP E2E' do received_points: 1 ) else + expected_first_group_points = direct_result == :lost ? 9 : 6 + expected_second_group_points = direct_result == :lost ? 6 : 6 + expect(ordered_scores[0].slice(:team_name, :position, :group_points, :difference_in_points, :scored_points, :received_points)) .to eq( team_name: expected_positions[0] == 1 ? 'G1-S1' : 'G1-S2', position: 1, - group_points: 6, + group_points: expected_first_group_points, difference_in_points: 3, scored_points: 5, received_points: 2 @@ -106,7 +109,7 @@ RSpec.describe 'Tournament lifecycle HTTP E2E' do .to eq( team_name: expected_positions[0] == 1 ? 'G1-S2' : 'G1-S1', position: 2, - group_points: 6, + group_points: expected_second_group_points, difference_in_points: 3, scored_points: 5, received_points: 2