require 'test_helper'

class CStavSponzorDarsControllerTest < ActionController::TestCase
  setup do
    @c_stav_sponzor_dar = c_stav_sponzor_dars(:one)
  end

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

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

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

    assert_redirected_to c_stav_sponzor_dar_path(assigns(:c_stav_sponzor_dar))
  end

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

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

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

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

    assert_redirected_to c_stav_sponzor_dars_path
  end
end
