require 'test_helper'

class MultiMediaDescriptionsControllerTest < ActionController::TestCase
  setup do
    @multi_media_description = multi_media_descriptions(:one)
  end

  test "should get index" do
    get :index
    assert_response :success
    assert_not_nil assigns(:multi_media_descriptions)
  end

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

  test "should create multi_media_description" do
    assert_difference('MultiMediaDescription.count') do
      post :create, multi_media_description: { item_id: @multi_media_description.item_id, media_type_id: @multi_media_description.media_type_id, url: @multi_media_description.url }
    end

    assert_redirected_to multi_media_description_path(assigns(:multi_media_description))
  end

  test "should show multi_media_description" do
    get :show, id: @multi_media_description
    assert_response :success
  end

  test "should get edit" do
    get :edit, id: @multi_media_description
    assert_response :success
  end

  test "should update multi_media_description" do
    patch :update, id: @multi_media_description, multi_media_description: { item_id: @multi_media_description.item_id, media_type_id: @multi_media_description.media_type_id, url: @multi_media_description.url }
    assert_redirected_to multi_media_description_path(assigns(:multi_media_description))
  end

  test "should destroy multi_media_description" do
    assert_difference('MultiMediaDescription.count', -1) do
      delete :destroy, id: @multi_media_description
    end

    assert_redirected_to multi_media_descriptions_path
  end
end
