require 'rails_helper'

RSpec.describe "settings/zones/new", type: :view do
  before(:each) do
    assign(:settings_zone, Settings::Zone.new(
      :name => "MyString",
      :is_active => false,
      :created_by => "MyString"
    ))
  end

  it "renders new settings_zone form" do
    render

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

      assert_select "input#settings_zone_name[name=?]", "settings_zone[name]"

      assert_select "input#settings_zone_is_active[name=?]", "settings_zone[is_active]"

      assert_select "input#settings_zone_created_by[name=?]", "settings_zone[created_by]"
    end
  end
end
