require "application_system_test_case"

class PersonTagsTest < ApplicationSystemTestCase
  setup do
    @person_tag = person_tags(:one)
  end

  test "visiting the index" do
    visit person_tags_url
    assert_selector "h1", text: "Person tags"
  end

  test "should create person tag" do
    visit person_tags_url
    click_on "New person tag"

    fill_in "Name", with: @person_tag.name
    click_on "Create Person tag"

    assert_text "Person tag was successfully created"
    click_on "Back"
  end

  test "should update Person tag" do
    visit person_tag_url(@person_tag)
    click_on "Edit this person tag", match: :first

    fill_in "Name", with: @person_tag.name
    click_on "Update Person tag"

    assert_text "Person tag was successfully updated"
    click_on "Back"
  end

  test "should destroy Person tag" do
    visit person_tag_url(@person_tag)
    click_on "Destroy this person tag", match: :first

    assert_text "Person tag was successfully destroyed"
  end
end
