1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Hide ads on schools#show, wrestlers#new, wrestlers#edit, and mats#show

This commit is contained in:
2026-02-11 07:55:49 -05:00
parent fcc8a9b9a9
commit d57aaac09d
4 changed files with 74 additions and 8 deletions

View File

@@ -66,6 +66,15 @@ class MatsControllerTest < ActionController::TestCase
def redirect
assert_redirected_to '/static_pages/not_allowed'
end
def assert_ads_hidden
assert_no_match(/blocked_message/, response.body)
assert_no_match(/adsbygoogle/, response.body)
end
def assert_ads_visible
assert_match(/blocked_message/, response.body)
end
def no_matches
assert_redirected_to "/tournaments/#{@tournament.id}/no_matches"
@@ -221,6 +230,13 @@ class MatsControllerTest < ActionController::TestCase
success
end
test "ads are hidden on mat show" do
sign_in_owner
show
success
assert_ads_hidden
end
test "redirect to mat show when posting a match from mat show" do
sign_in_owner
post_match_update_from_mat_show