require 'rails_helper'

RSpec.describe "info_pages/new", type: :view do
  before(:each) do
    assign(:info_page, InfoPage.new(
      :title => "MyString",
      :text => "MyText",
      :uri_title => "MyString"
    ))
  end

  it "renders new info_page form" do
    render

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

      assert_select "input#info_page_title[name=?]", "info_page[title]"

      assert_select "textarea#info_page_text[name=?]", "info_page[text]"

      assert_select "input#info_page_uri_title[name=?]", "info_page[uri_title]"
    end
  end
end
