require 'test_helper'

class CStavPodujatiaControllerTest < ActionController::TestCase
  setup do
    @c_stav_podujatium = c_stav_podujatia(:one)
  end

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

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

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

    assert_redirected_to c_stav_podujatium_path(assigns(:c_stav_podujatium))
  end

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

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

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

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

    assert_redirected_to c_stav_podujatia_path
  end
end
