Allinea le spec alla policy password e prepara i piani di test.

Senza questo la suite locale fallisce sulla complessità password e sui piani mancanti.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-18 23:20:31 +02:00
co-authored by Cursor
parent 841a6a15be
commit 1e4e0560f1
29 changed files with 41 additions and 33 deletions
@@ -1,7 +1,7 @@
require "rails_helper"
RSpec.describe Scoring::ApplyAction do
let!(:user) { User.create!(email: "score@test.it", name: "U", password: "password123", role: "coach") }
let!(:user) { User.create!(email: "score@test.it", name: "U", password: "Password123", role: "coach") }
let!(:club) { Club.create!(name: "C", sport: "volleyball", primary_color: "#e53935", secondary_color: "#ffffff") }
let!(:team) { club.teams.create!(name: "T", sport: "volleyball") }
let!(:match) { team.matches.create!(opponent_name: "Opp", sport: "volleyball", sets_to_win: 3) }
@@ -6,7 +6,7 @@ RSpec.describe Scoring::Engines::GenericEngine do
let!(:club) { Club.create!(name: "C", sport: "volleyball", primary_color: "#e53935", secondary_color: "#ffffff") }
let!(:team) { club.teams.create!(name: "T", sport: "altro") }
let!(:match) { team.matches.create!(opponent_name: "Opp", sport: "altro") }
let!(:user) { User.create!(email: "g@example.com", password: "secret123", name: "Coach") }
let!(:user) { User.create!(email: "g@example.com", password: "Password123", name: "Coach") }
let!(:session) { StreamSession.create!(match: match, user: user, status: "live", platform: "matchlivetv") }
it "incrementa solo il contatore senza chiudere set" do
@@ -13,7 +13,7 @@ RSpec.describe Scoring::PeriodData do
end
RSpec.describe "Basket advance_period con periodo corrotto" do
let!(:user) { User.create!(email: "period@test.it", name: "U", password: "password123", role: "coach") }
let!(:user) { User.create!(email: "period@test.it", name: "U", password: "Password123", role: "coach") }
let!(:club) { Club.create!(name: "C", sport: "basket", primary_color: "#e53935", secondary_color: "#ffffff") }
let!(:team) { club.teams.create!(name: "U13", sport_key: "basket") }
let!(:match) { team.matches.create!(opponent_name: "Opp", sport: "basket") }
@@ -1,7 +1,7 @@
require "rails_helper"
RSpec.describe Scoring::SyncState do
let!(:user) { User.create!(email: "sync@test.it", name: "U", password: "password123", role: "coach") }
let!(:user) { User.create!(email: "sync@test.it", name: "U", password: "Password123", role: "coach") }
let!(:club) { Club.create!(name: "C", sport: "volleyball", primary_color: "#e53935", secondary_color: "#ffffff") }
let!(:team) { club.teams.create!(name: "T", sport: "volleyball") }
let!(:match) { team.matches.create!(opponent_name: "Opp", sport: "volleyball", sets_to_win: 3) }
@@ -1,7 +1,7 @@
require "rails_helper"
RSpec.describe "Volley close_set" do
let!(:user) { User.create!(email: "volley-close@test.it", name: "U", password: "password123", role: "coach") }
let!(:user) { User.create!(email: "volley-close@test.it", name: "U", password: "Password123", role: "coach") }
let!(:club) { Club.create!(name: "C", sport: "volleyball", primary_color: "#e53935", secondary_color: "#ffffff") }
let!(:team) { club.teams.create!(name: "T", sport: "volleyball") }
let!(:match) { team.matches.create!(opponent_name: "Opp", sport: "volleyball", sets_to_win: 3) }