require 'test_helper'

class ProfessionalProfessionImagesControllerTest < ActionDispatch::IntegrationTest
  setup do
    @professional_profession_image = professional_profession_images(:one)
  end

  test "should get index" do
    get professional_profession_images_url
    assert_response :success
  end

  test "should get new" do
    get new_professional_profession_image_url
    assert_response :success
  end

  test "should create professional_profession_image" do
    assert_difference('ProfessionalProfessionImage.count') do
      post professional_profession_images_url, params: { professional_profession_image: { photo_content: @professional_profession_image.photo_content, photo_content_type: @professional_profession_image.photo_content_type, photo_file_name: @professional_profession_image.photo_file_name, photo_file_size: @professional_profession_image.photo_file_size, photo_updated_at: @professional_profession_image.photo_updated_at, professional_profession_id: @professional_profession_image.professional_profession_id, subtitle: @professional_profession_image.subtitle } }
    end

    assert_redirected_to professional_profession_image_url(ProfessionalProfessionImage.last)
  end

  test "should show professional_profession_image" do
    get professional_profession_image_url(@professional_profession_image)
    assert_response :success
  end

  test "should get edit" do
    get edit_professional_profession_image_url(@professional_profession_image)
    assert_response :success
  end

  test "should update professional_profession_image" do
    patch professional_profession_image_url(@professional_profession_image), params: { professional_profession_image: { photo_content: @professional_profession_image.photo_content, photo_content_type: @professional_profession_image.photo_content_type, photo_file_name: @professional_profession_image.photo_file_name, photo_file_size: @professional_profession_image.photo_file_size, photo_updated_at: @professional_profession_image.photo_updated_at, professional_profession_id: @professional_profession_image.professional_profession_id, subtitle: @professional_profession_image.subtitle } }
    assert_redirected_to professional_profession_image_url(@professional_profession_image)
  end

  test "should destroy professional_profession_image" do
    assert_difference('ProfessionalProfessionImage.count', -1) do
      delete professional_profession_image_url(@professional_profession_image)
    end

    assert_redirected_to professional_profession_images_url
  end
end
