require "application_system_test_case"

class CompanySizesTest < ApplicationSystemTestCase
  setup do
    @company_size = company_sizes(:one)
  end

  test "visiting the index" do
    visit company_sizes_url
    assert_selector "h1", text: "Company Sizes"
  end

  test "creating a Company size" do
    visit company_sizes_url
    click_on "New Company Size"

    fill_in "Description", with: @company_size.description
    fill_in "Name", with: @company_size.name
    click_on "Create Company size"

    assert_text "Company size was successfully created"
    click_on "Back"
  end

  test "updating a Company size" do
    visit company_sizes_url
    click_on "Edit", match: :first

    fill_in "Description", with: @company_size.description
    fill_in "Name", with: @company_size.name
    click_on "Update Company size"

    assert_text "Company size was successfully updated"
    click_on "Back"
  end

  test "destroying a Company size" do
    visit company_sizes_url
    page.accept_confirm do
      click_on "Destroy", match: :first
    end

    assert_text "Company size was successfully destroyed"
  end
end
