require 'rails_helper'

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

  it "renders the edit settings_tax_profile form" do
    render

    assert_select "form[action=?][method=?]", settings_tax_profile_path(@settings_tax_profile), "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
