require 'rails_helper'

RSpec.describe "info_pages/index", type: :view do
  before(:each) do
    assign(:info_pages, [
      InfoPage.create!(
        :title => "Title",
        :text => "MyText",
        :uri_title => "Uri Title"
      ),
      InfoPage.create!(
        :title => "Title",
        :text => "MyText",
        :uri_title => "Uri Title"
      )
    ])
  end

  it "renders a list of info_pages" do
    render
    assert_select "tr>td", :text => "Title".to_s, :count => 2
    assert_select "tr>td", :text => "MyText".to_s, :count => 2
    assert_select "tr>td", :text => "Uri Title".to_s, :count => 2
  end
end
