require 'rails_helper'

RSpec.describe "settings/menu_item_attributes/index", type: :view do
  before(:each) do
    assign(:settings_menu_item_attributes, [
      Settings::MenuItemAttribute.create!(
        :attribute_type => "Attribute Type",
        :name => "Name",
        :value => "Value"
      ),
      Settings::MenuItemAttribute.create!(
        :attribute_type => "Attribute Type",
        :name => "Name",
        :value => "Value"
      )
    ])
  end

  it "renders a list of settings/menu_item_attributes" do
    render
    assert_select "tr>td", :text => "Attribute Type".to_s, :count => 2
    assert_select "tr>td", :text => "Name".to_s, :count => 2
    assert_select "tr>td", :text => "Value".to_s, :count => 2
  end
end
