Files
eminuxandCursor d52434fb2e Limita una diretta attiva per account e valorizza la copertina Premium Full.
Blocca la seconda diretta sullo stesso utente, registra gli abusi in admin e presenta la copertina come grafica caricata dalla società, con demo Team MLTV.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-01 12:52:26 +02:00

46 lines
1.8 KiB
Ruby

require "rails_helper"
RSpec.describe "Public home page", type: :request do
it "mostra i link agli store nell'hero e nel footer" do
get root_path
expect(response).to have_http_status(:ok)
expect(response.body).to include(MatchLiveTv.app_store_url)
expect(response.body).to include(MatchLiveTv.play_store_url)
expect(response.body).to include(I18n.t("home.stores_label", locale: :it))
expect(response.body).to include(I18n.t("home.store_app_store_name", locale: :it))
expect(response.body).to include(I18n.t("home.store_play_name", locale: :it))
expect(response.body).to include("Dai visibilità ai tuoi sponsor")
expect(response.body).to include("Team MLTV")
expect(response.body).not_to include("Lupi Santa Croce")
expect(response.body).to include("Scopri Premium Full")
expect(response.body.scan(MatchLiveTv.app_store_url).size).to eq(3)
expect(response.body.scan(MatchLiveTv.play_store_url).size).to eq(3)
end
{
"it" => "Per andare in diretta dallo smartphone",
"en" => "To go live from your smartphone",
"fr" => "Pour passer en direct depuis le smartphone",
"de" => "Live gehen vom Smartphone",
"es" => "Para emitir en directo desde el smartphone"
}.each do |locale, label|
it "traduce i badge store in #{locale} senza translation missing" do
cookies[:mltv_locale] = locale
get root_path
expect(response).to have_http_status(:ok)
expect(response.body).to include(label)
expect(response.body).not_to include("translation missing")
end
end
it "non mostra i badge store nel chrome App Store Review" do
get public_support_path
expect(response).to have_http_status(:ok)
expect(response.body).not_to include(MatchLiveTv.app_store_url)
expect(response.body).not_to include(MatchLiveTv.play_store_url)
end
end