require 'test_helper'

class PodujatiaControllerTest < ActionController::TestCase
  setup do
    @podujatium = podujatia(:one)
  end

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

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

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

    assert_redirected_to podujatium_path(assigns(:podujatium))
  end

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

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

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

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

    assert_redirected_to podujatia_path
  end
end
