require 'test_helper'

class SponzorskeDariesControllerTest < ActionController::TestCase
  setup do
    @sponzorske_dary = sponzorske_daries(:one)
  end

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

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

  test "should create sponzorske_dary" do
    assert_difference('SponzorskeDary.count') do
      post :create, sponzorske_dary: @sponzorske_dary.attributes
    end

    assert_redirected_to sponzorske_dary_path(assigns(:sponzorske_dary))
  end

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

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

  test "should update sponzorske_dary" do
    put :update, id: @sponzorske_dary, sponzorske_dary: @sponzorske_dary.attributes
    assert_redirected_to sponzorske_dary_path(assigns(:sponzorske_dary))
  end

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

    assert_redirected_to sponzorske_daries_path
  end
end
