下記のソースにて、
rootパスにだけ get 指定しているのはどういった理由があるのでしょうか?
require 'test_helper' class SiteLayoutTest < ActionDispatch::IntegrationTest # test "the truth" do # assert true # end test "layout links" do get root_path assert_template 'static_pages/home' assert_select "a[href=?]", root_path, count:2 # ルートurlへのリンクは2つある assert_select "a[href=?]", help_path # ?部分にabout_pathを置換 # <a href="/about">...</a> assert_select "a[href=?]", about_path assert_select "a[href=?]", contact_path end end
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/09/22 12:15 編集
2018/09/22 12:22
2018/09/22 12:23
2018/09/22 12:42