require 'rails_helper'

RSpec.describe "settings/menu_items/show", type: :view do
  before(:each) do
    @settings_menu_item = assign(:settings_menu_item, Settings::MenuItem.create!(
      :item_code => "Item Code",
      :name => "Name",
      :alt_name => "Alt Name",
      :type => "Type",
      :menu_category => nil,
      :menu_item => nil,
      :min_qty => 2,
      :min_selectable_item => 3,
      :max_selectable_item => 4,
      :created_by => "Created By"
    ))
  end

  it "renders attributes in <p>" do
    render
    expect(rendered).to match(/Item Code/)
    expect(rendered).to match(/Name/)
    expect(rendered).to match(/Alt Name/)
    expect(rendered).to match(/Type/)
    expect(rendered).to match(//)
    expect(rendered).to match(//)
    expect(rendered).to match(/2/)
    expect(rendered).to match(/3/)
    expect(rendered).to match(/4/)
    expect(rendered).to match(/Created By/)
  end
end
