require "application_system_test_case"

class ZiyarasTest < ApplicationSystemTestCase
  setup do
    @ziyara = ziyaras(:one)
  end

  test "visiting the index" do
    visit ziyaras_url
    assert_selector "h1", text: "Ziyaras"
  end

  test "should create ziyara" do
    visit ziyaras_url
    click_on "New ziyara"

    fill_in "Name", with: @ziyara.name
    click_on "Create Ziyara"

    assert_text "Ziyara was successfully created"
    click_on "Back"
  end

  test "should update Ziyara" do
    visit ziyara_url(@ziyara)
    click_on "Edit this ziyara", match: :first

    fill_in "Name", with: @ziyara.name
    click_on "Update Ziyara"

    assert_text "Ziyara was successfully updated"
    click_on "Back"
  end

  test "should destroy Ziyara" do
    visit ziyara_url(@ziyara)
    click_on "Destroy this ziyara", match: :first

    assert_text "Ziyara was successfully destroyed"
  end
end
