require 'rails_helper'

RSpec.describe "settings/menu_item_attributes/new", type: :view do
  before(:each) do
    assign(:settings_menu_item_attribute, Settings::MenuItemAttribute.new(
      :attribute_type => "MyString",
      :name => "MyString",
      :value => "MyString"
    ))
  end

  it "renders new settings_menu_item_attribute form" do
    render

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

      assert_select "input#settings_menu_item_attribute_attribute_type[name=?]", "settings_menu_item_attribute[attribute_type]"

      assert_select "input#settings_menu_item_attribute_name[name=?]", "settings_menu_item_attribute[name]"

      assert_select "input#settings_menu_item_attribute_value[name=?]", "settings_menu_item_attribute[value]"
    end
  end
end
