require 'rails_helper'

RSpec.describe "settings/tax_profiles/new", type: :view do
  before(:each) do
    assign(:settings_tax_profile, Settings::TaxProfile.new(
      :name => "MyString",
      :rate => "9.99",
      :inclusive => false,
      :order_by => 1,
      :created_by => "MyString"
    ))
  end

  it "renders new settings_tax_profile form" do
    render

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

      assert_select "input#settings_tax_profile_name[name=?]", "settings_tax_profile[name]"

      assert_select "input#settings_tax_profile_rate[name=?]", "settings_tax_profile[rate]"

      assert_select "input#settings_tax_profile_inclusive[name=?]", "settings_tax_profile[inclusive]"

      assert_select "input#settings_tax_profile_order_by[name=?]", "settings_tax_profile[order_by]"

      assert_select "input#settings_tax_profile_created_by[name=?]", "settings_tax_profile[created_by]"
    end
  end
end
