require 'rails_helper'

RSpec.describe "settings/menu_categories/edit", type: :view do
  before(:each) do
    @settings_menu_category = assign(:settings_menu_category, Settings::MenuCategory.create!(
      :menu => nil,
      :name => "MyString",
      :alt_name => "MyString",
      :order_by => 1,
      :menu_category => nil
    ))
  end

  it "renders the edit settings_menu_category form" do
    render

    assert_select "form[action=?][method=?]", settings_menu_category_path(@settings_menu_category), "post" do

      assert_select "input#settings_menu_category_menu_id[name=?]", "settings_menu_category[menu_id]"

      assert_select "input#settings_menu_category_name[name=?]", "settings_menu_category[name]"

      assert_select "input#settings_menu_category_alt_name[name=?]", "settings_menu_category[alt_name]"

      assert_select "input#settings_menu_category_order_by[name=?]", "settings_menu_category[order_by]"

      assert_select "input#settings_menu_category_menu_category_id[name=?]", "settings_menu_category[menu_category_id]"
    end
  end
end
