require 'rails_helper'

RSpec.describe "social_links/new", type: :view do
  before(:each) do
    assign(:social_link, SocialLink.new(
      profile: nil,
      url: "MyString"
    ))
  end

  it "renders new social_link form" do
    render

    assert_select "form[action=?][method=?]", social_links_path, "post" do

      assert_select "input[name=?]", "social_link[profile_id]"

      assert_select "input[name=?]", "social_link[url]"
    end
  end
end
