1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

add a test on application layouts viewport meta tag

This commit is contained in:
jean-francois labbe 2021-10-19 09:36:23 +02:00
parent a24467893e
commit 9e50dd2dff
2 changed files with 9 additions and 1 deletions

View file

@ -182,7 +182,7 @@ module ApplicationTests
end end
def test_code_statistics def test_code_statistics
assert_match "Code LOC: 61 Test LOC: 3 Code to Test Ratio: 1:0.0", assert_match "Code LOC: 62 Test LOC: 3 Code to Test Ratio: 1:0.0",
rails("stats") rails("stats")
end end

View file

@ -551,6 +551,14 @@ class AppGeneratorTest < Rails::Generators::TestCase
end end
end end
def test_viewport_meta_tag_is_present
run_generator [destination_root]
assert_file "app/views/layouts/application.html.erb" do |contents|
assert_match(/<meta name="viewport"/, contents)
end
end
def test_javascript_is_skipped_if_required def test_javascript_is_skipped_if_required
run_generator [destination_root, "--skip-javascript"] run_generator [destination_root, "--skip-javascript"]