Aggiunge copertina sponsor custom solo Premium Full, con override in wizard e slate sui nodi di streaming.
Permette upload da portale e app con ereditarietà partita→squadra→società, generazione MP4 via ffmpeg e distribuzione su home lab e nodi CPX per pause e assenza segnale. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
require "rails_helper"
|
||||
|
||||
RSpec.describe GenerateCoverSlateJob do
|
||||
let!(:club) { Club.create!(name: "Club", sport: "volleyball", primary_color: "#e53935", secondary_color: "#ffffff") }
|
||||
let!(:team) { club.teams.create!(name: "Team", sport: "volleyball") }
|
||||
let!(:match) { team.matches.create!(opponent_name: "Opp", sport: "volleyball") }
|
||||
|
||||
before do
|
||||
load Rails.root.join("db/seeds/plans.rb")
|
||||
match.cover_image.attach(
|
||||
io: StringIO.new("img"),
|
||||
filename: "c.png",
|
||||
content_type: "image/png"
|
||||
)
|
||||
end
|
||||
|
||||
it "usa coda critical per Match" do
|
||||
expect(described_class).to receive(:set).with(queue: :critical).and_return(described_class)
|
||||
expect(described_class).to receive(:perform_later).with("Match", match.id)
|
||||
described_class.enqueue_for(match)
|
||||
end
|
||||
|
||||
it "usa coda default per Club" do
|
||||
club.cover_image.attach(io: StringIO.new("img"), filename: "c.png", content_type: "image/png")
|
||||
expect(described_class).to receive(:set).with(queue: :default).and_return(described_class)
|
||||
expect(described_class).to receive(:perform_later).with("Club", club.id)
|
||||
described_class.enqueue_for(club)
|
||||
end
|
||||
|
||||
it "invoca GenerateCoverSlate al perform" do
|
||||
expect(Streams::GenerateCoverSlate).to receive(:call).with(match)
|
||||
described_class.perform_now("Match", match.id)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user