require 'rails_helper'

RSpec.describe "settings/item_sets/index", type: :view do
  before(:each) do
    assign(:settings_item_sets, [
      Settings::ItemSet.create!(
        :name => "Name",
        :min_selectable_qty => 2,
        :max_selectable_qty => 3
      ),
      Settings::ItemSet.create!(
        :name => "Name",
        :min_selectable_qty => 2,
        :max_selectable_qty => 3
      )
    ])
  end

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