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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user