require 'rails_helper'

RSpec.describe "settings/item_sets/new", type: :view do
  before(:each) do
    assign(:settings_item_set, Settings::ItemSet.new(
      :name => "MyString",
      :min_selectable_qty => 1,
      :max_selectable_qty => 1
    ))
  end

  it "renders new settings_item_set form" do
    render

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

      assert_select "input[name=?]", "settings_item_set[name]"

      assert_select "input[name=?]", "settings_item_set[min_selectable_qty]"

      assert_select "input[name=?]", "settings_item_set[max_selectable_qty]"
    end
  end
end
