require 'rails_helper' RSpec.describe "social_links/edit", type: :view do let(:social_link) { SocialLink.create!( profile: nil, url: "MyString" ) } before(:each) do assign(:social_link, social_link) end it "renders the edit social_link form" do render assert_select "form[action=?][method=?]", social_link_path(social_link), "post" do assert_select "input[name=?]", "social_link[profile_id]" assert_select "input[name=?]", "social_link[url]" end end end